Do long polling requests from clients ever expire or stop attempting to connect #4847
-
Long story short, I have a web app where I was using socket.io at first, but transitioned away from it as I found a stateless way to handle my workloads. I used socket.io it for many months before transitioning away and even after about two days of having no socket.io references in my backend or front end code, I still see hundreds of long-polling requests 404ing against my application in production My best guess is that clients who still had my page open are still attempting to connect, but I would have imagined that after a couple minutes all those requests would expire or stop attempting to connect. Is there a built in expiration or retry limit on clients attempting to connect to the socket.io server(which is no longer there)? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! The Reference: https://socket.io/docs/v4/client-options/#reconnectionattempts |
Beta Was this translation helpful? Give feedback.
Hi!
The
reconnectionAttempts
option defaults toInfinity
, so I think unfortunately those clients will try to reconnect forever.Reference: https://socket.io/docs/v4/client-options/#reconnectionattempts