Skip to content

Commit

Permalink
fix: error on heartbeat
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
  • Loading branch information
cameri committed Feb 2, 2023
1 parent 8a6ed70 commit 9d1a027
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/adapters/web-socket-server-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ export class WebSocketServerAdapter extends WebServerAdapter implements IWebSock
private onHeartbeat() {
this.webSocketServer.clients.forEach((webSocket) => {
const webSocketAdapter = this.webSocketsAdapters.get(webSocket) as IWebSocketAdapter
webSocketAdapter.emit(WebSocketAdapterEvent.Heartbeat)
if (webSocketAdapter) {
webSocketAdapter.emit(WebSocketAdapterEvent.Heartbeat)
}
})
}
}

0 comments on commit 9d1a027

Please sign in to comment.