fix mistake
This commit is contained in:
@@ -59,7 +59,7 @@ export function waitForSocketEvent(
|
|||||||
}
|
}
|
||||||
|
|
||||||
wsClient.on(event, (e) => resolver(e));
|
wsClient.on(event, (e) => resolver(e));
|
||||||
wsClient.on('errorEvent', (e) => rejector(e));
|
wsClient.on('error', (e) => rejector(e));
|
||||||
|
|
||||||
// if (event !== 'close') {
|
// if (event !== 'close') {
|
||||||
// wsClient.on('close', (event) => {
|
// wsClient.on('close', (event) => {
|
||||||
@@ -89,7 +89,7 @@ export function listenToSocketEvents(wsClient: WebsocketClient) {
|
|||||||
wsClient.on('response', retVal.response);
|
wsClient.on('response', retVal.response);
|
||||||
wsClient.on('update', retVal.update);
|
wsClient.on('update', retVal.update);
|
||||||
wsClient.on('close', retVal.close);
|
wsClient.on('close', retVal.close);
|
||||||
wsClient.on('errorEvent', retVal.error);
|
wsClient.on('error', retVal.error);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...retVal,
|
...retVal,
|
||||||
@@ -98,7 +98,7 @@ export function listenToSocketEvents(wsClient: WebsocketClient) {
|
|||||||
wsClient.removeListener('response', retVal.response);
|
wsClient.removeListener('response', retVal.response);
|
||||||
wsClient.removeListener('update', retVal.update);
|
wsClient.removeListener('update', retVal.update);
|
||||||
wsClient.removeListener('close', retVal.close);
|
wsClient.removeListener('close', retVal.close);
|
||||||
wsClient.removeListener('errorEvent', retVal.error);
|
wsClient.removeListener('error', retVal.error);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user