Skip to content

Commit

Permalink
fix: add reconnection attempts for socket
Browse files Browse the repository at this point in the history
(cherry picked from commit 10ec112)
  • Loading branch information
ruchamahabal authored and mergify[bot] committed Dec 1, 2023
1 parent a8516ee commit 2bdad80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ function initSocket() {
let port = window.location.port ? `:${socketio_port}` : ""
let protocol = port ? "http" : "https"
let url = `${protocol}://${host}${port}/${host}`
let socket = io(url, { withCredentials: true })
let socket = io(url, {
withCredentials: true,
reconnectionAttempts: 5,
})
return socket
}

Expand Down

0 comments on commit 2bdad80

Please sign in to comment.