add error handler for connection
This commit is contained in:
parent
3770f4a86a
commit
272f5cc5ab
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue