socket.io
socket.io copied to clipboard
Volatile not behaving as expected
You want to:
- [x] report a bug
Current behaviour
Server sends (volatile!) messages in a rate of 300KB/s. Client's bandwidth is 150KB/s. Client receives (almost all) messages in order, with an increasing delay as time goes by.
Server drops messages when transport is not writable, but it only happens once/twice every 10/20 messages. According to this setup it should drop every other message.
Steps to reproduce (if the current behaviour is a bug)
Server Clone the following test project
https://github.com/shaiperfecto/socket.io-volatile-bug
npm install; npm start
Server starts at port 8081
Client
Browse to http://
Make sure you limit your network connection (either using Chrome devtools, I used Network link conditioner to 150KB/s
Expected behaviour
Server should drop messages when the client is still receiving the previously sent message
Setup
- OS: MacOS High Sierra
- browser: Chrome
- socket.io version: Latest
Other information (e.g. stacktraces, related issues, suggestions how to fix)
And this could be easily fixed if socket.io would support behavior described in #3158
For future readers: I think this is fixed in latest versions, I wasn't able to reproduce down to version 2.1.1:
Without throttling:
2
3
4
5
...
With Chrome throttling at 150 kb/s:
3
34
64
94
125
...
Possibly related:
- https://github.com/socketio/engine.io/commit/01c6a12de51aa0252a6d624a7a968eb144655c3f
- https://github.com/socketio/engine.io/commit/ad5306aeaedf06ac7a49f791e1b76e55c35a564e
Please reopen if needed.