fix mistake

This commit is contained in:
tiagosiebler
2022-09-19 00:18:56 +01:00
parent 250174a7b2
commit f7d59b48c1

View File

@@ -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);
}, },
}; };
} }