Merge pull request #2907 from chakflying/fix/disconnect-redis

Fix: Disconnect redis after ping
This commit is contained in:
Louis Lam 2023-03-08 22:57:30 +08:00 committed by GitHub
commit a599f5149b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -408,6 +408,9 @@ exports.redisPingAsync = function (dsn) {
});
client.connect().then(() => {
client.ping().then((res, err) => {
if (client.isOpen) {
client.disconnect();
}
if (err) {
reject(err);
} else {