Fixed socket already open issue
This commit is contained in:
		@@ -12,15 +12,20 @@ class ClientCompat
 | 
				
			|||||||
		this.client = Redis.createClient({
 | 
							this.client = Redis.createClient({
 | 
				
			||||||
			"url": `redis://${SessConf.config.host}:${SessConf.config.port}/${SessConf.config.database}`
 | 
								"url": `redis://${SessConf.config.host}:${SessConf.config.port}/${SessConf.config.database}`
 | 
				
			||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.connecting = false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	_nop() { }
 | 
						_nop() { }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	async _connect()
 | 
						async _connect()
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		if( this.client.isReady )
 | 
							if( this.client.isReady || this.connecting )
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.connecting = true;
 | 
				
			||||||
		await this.client.connect();
 | 
							await this.client.connect();
 | 
				
			||||||
 | 
							this.connecting = false;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	async GET( key, handler )
 | 
						async GET( key, handler )
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user