cvmts: nope I have to fix it properly
This commit is contained in:
@@ -35,6 +35,9 @@ export default class WSClient extends EventEmitter implements NetworkClient {
|
||||
}
|
||||
send(msg: string): Promise<void> {
|
||||
return new Promise((res,rej) => {
|
||||
if(!this.isOpen())
|
||||
res();
|
||||
|
||||
this.socket.send(msg, (err) => {
|
||||
if (err) {
|
||||
rej(err);
|
||||
@@ -49,4 +52,4 @@ export default class WSClient extends EventEmitter implements NetworkClient {
|
||||
this.socket.close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user