Describe the bug
Take the following steps:
- put browser into offline mode
- use
emitWithAck to send a message immediately
- expect
emitWithAck to throw on disconnect, but it does not
- put browser into online mode and reconnect.
emitWithAck still not resolving.
To Reproduce
Socket.IO client and server version: 4.7.4
I used the socket.io chat example to make a reproduction repo:
https://github.com/jd1378/socketio-emit-ack-bug
Expected behavior
I expect the emitWithAck to throw once the socket is disconnected. OR, I expect emitWithAck to retry the request, as it's not volatile.
Platform:
Additional context
What's even better than the expected behavior? a new option to control the behavior.
what I really want is to be able to detect the failure of my requests and throw, much like how a fetch request would throw if connection fails. and I don't want to retry the request automatically when it's thrown.
Describe the bug
Take the following steps:
emitWithAckto send a message immediatelyemitWithAckto throw on disconnect, but it does notemitWithAckstill not resolving.To Reproduce
Socket.IO client and server version:
4.7.4I used the socket.io chat example to make a reproduction repo:
https://github.com/jd1378/socketio-emit-ack-bug
Expected behavior
I expect the
emitWithAckto throw once the socket is disconnected. OR, I expectemitWithAckto retry the request, as it's not volatile.Platform:
Additional context
What's even better than the expected behavior? a new option to control the behavior.
what I really want is to be able to detect the failure of my requests and throw, much like how a fetch request would throw if connection fails. and I don't want to retry the request automatically when it's thrown.