Skip to content

Commit

Permalink
fix: socket errors (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
poboll authored Dec 17, 2023
1 parent 10cf466 commit 95ae696
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/socket/socket-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ class SocketClient {
private router: AppRouterInstance

constructor() {
this.socket = io(`${GATEWAY_URL}/web`, {
const gatewayUrlWithoutTrailingSlash = GATEWAY_URL.replace(/\/$/, '');

this.socket = io(`${gatewayUrlWithoutTrailingSlash}/web`, {
timeout: 10000,
reconnectionDelay: 3000,
autoConnect: false,
reconnectionAttempts: 3,
transports: ['websocket'],
})
});
}

setRouter(router: AppRouterInstance) {
Expand Down

0 comments on commit 95ae696

Please sign in to comment.