Skip to content

Commit

Permalink
fix(client): catch closing websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
st-vi committed Dec 12, 2023
1 parent 098c521 commit 73c2492
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions WebSocketClient/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ const createWebSocket = (url: string): WebSocket => {
createWebSocket(url);
});
};
webSocket.onclose = () => {
setTimeout(() => {
createWebSocket(url);
}, 500);
}
return webSocket;
};

Expand Down

0 comments on commit 73c2492

Please sign in to comment.