Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Disable/restrict failed request queue? #38

Closed
ryuken opened this issue Sep 15, 2016 · 4 comments
Closed

Disable/restrict failed request queue? #38

ryuken opened this issue Sep 15, 2016 · 4 comments

Comments

@ryuken
Copy link

ryuken commented Sep 15, 2016

Hi I'm searching for a way to disable or restrict the failed request queue to 1.
So basically socket.io queue's failed requests when network connection is gone and resends those when connection resumes.

How can I stop this behaviour or restrict the maximum amount of requests?

@daffl
Copy link
Member

daffl commented Sep 15, 2016

I found this SO answer to set the Socket.io max reconnection retries. Not sure if that is what you are looking for. You might have more luck finding an answer in the Socket.io channels or GitHub.

@ryuken
Copy link
Author

ryuken commented Sep 16, 2016

Nah that's the reconnection timings.
If the connection is lost and you still try to do stuff, the client will queue those requests and send them when reconnected.

I solved it by checking if there is any internet connection in all actions lol, but its a kinda crappy solution. I wish there was a way to stop this behaviour of socket.io

Primus does have a queueSize option, but I couldn't make Primus work with socket.io

@ryuken ryuken closed this as completed Sep 16, 2016
@ekryski
Copy link
Member

ekryski commented Oct 16, 2016

@ryuken care to post the solution for reference? 😁

@ryuken
Copy link
Author

ryuken commented Oct 16, 2016

I didn't solve it with socketio (they don't support this).
I checked if there is any internet connection before dispatching my events lol.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants