Fixed socket already open issue
This commit is contained in:
parent
6f9fd7b88c
commit
992bf37dc1
@ -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 )
|
||||
|
Loading…
Reference in New Issue
Block a user