Skip to content

Commit 9cbdeb3

Browse files
authored
[price-service] Handle WS error (#501)
1 parent 47c9993 commit 9cbdeb3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

price-service/src/ws.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ export class WebSocketAPI {
233233
this.aliveClients.add(ws);
234234
});
235235

236+
ws.on("error", (err: Error) => {
237+
logger.warn(`Err with client ${this.wsId.get(ws)}: ${err}`);
238+
});
239+
236240
ws.on("close", (_code: number, _reason: Buffer) => {
237241
logger.info(`client ${this.wsId.get(ws)} closed the connection.`);
238242
this.promClient?.addWebSocketInteraction("close", "ok");

0 commit comments

Comments
 (0)