Replies: 1 comment
-
It looks like this can now be done in Socket.io with the ackTimeout setting when establishing the connection: import { io } from "socket.io-client";
const socket = io({
ackTimeout: 10000 // time out after 10 seconds
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What works
Handling sockets that are already timed out fully is easily possible. Just never send the request in the first place and show an error.
What doesn't work
When a socket just broke but has not yet timed out, we don't know about it. When we now send the request it never finishes as feathers itself doesn't seem to have a timeout.
The request will complete when the socket is reestablished, but since the user can close the browser in-between this is not sufficient.
How to detect that the request was sent into a broken socket?
Beta Was this translation helpful? Give feedback.
All reactions