diff --git a/redisclient.js b/redisclient.js index fcea483..fab471e 100644 --- a/redisclient.js +++ b/redisclient.js @@ -12,15 +12,20 @@ class ClientCompat this.client = Redis.createClient({ "url": `redis://${SessConf.config.host}:${SessConf.config.port}/${SessConf.config.database}` }); + + this.connecting = false; } _nop() { } async _connect() { - if( this.client.isReady ) + if( this.client.isReady || this.connecting ) return; + + this.connecting = true; await this.client.connect(); + this.connecting = false; } async GET( key, handler )