mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
Merge pull request #2907 from chakflying/fix/disconnect-redis
Fix: Disconnect redis after ping
This commit is contained in:
commit
a599f5149b
1 changed files with 3 additions and 0 deletions
|
@ -408,6 +408,9 @@ exports.redisPingAsync = function (dsn) {
|
||||||
});
|
});
|
||||||
client.connect().then(() => {
|
client.connect().then(() => {
|
||||||
client.ping().then((res, err) => {
|
client.ping().then((res, err) => {
|
||||||
|
if (client.isOpen) {
|
||||||
|
client.disconnect();
|
||||||
|
}
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue