add error handler for connection

This commit is contained in:
Hazelnoot 2025-08-15 23:33:09 -04:00
parent 3770f4a86a
commit 272f5cc5ab

View file

@ -275,6 +275,7 @@ export class StreamingApiServerService implements OnApplicationShutdown {
};
connection.once('close', () => {
connection.off('error', this.onWsError);
connection.off('pong', pong);
ev.removeAllListeners();
stream.dispose();
@ -283,6 +284,7 @@ export class StreamingApiServerService implements OnApplicationShutdown {
if (userUpdateIntervalId) clearInterval(userUpdateIntervalId);
});
connection.on('error', this.onWsError);
connection.on('pong', pong);
});