Fixed socket already open issue
This commit is contained in:
		@@ -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 )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user