-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
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:
- Windows 10, Edge browser
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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working