Closed Gabriel-id closed 3 months ago
@Gabriel-id -
broadcaster.write
in the callback itself?@Gabriel-id -
- when you say sudden surge in data volume, what is it like? MBs? GBs? TBs?
- why are you re-emitting? can't you do
broadcaster.write
in the callback itself?
Yes, it would be possible. It was just one of the tests I was conducting.
ok - try that. i.e, omit the unread
callback and just do things in socket.on(data)
callback and see if it removes the freeze?
Closing as it's been 2 weeks without a reply to the suggestion in https://github.com/nodejs/help/issues/4361#issuecomment-2012508524.
Details
I'm having a problem with a Node.js application. This application is a client that reads data from a TCP connection using net.socket. When there's a sudden surge in data volume, the socket appears to freeze, preventing further data arrival. After a period of being stuck, the socket unlocks, and the previously withheld data starts arriving, as if it had been temporarily held back and then released.
Node.js version
18.7.1
Example code
Operating system
Linux
Scope
code and runtime
Module and version
Not applicable.