You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
permessage-deflate is enabled and one of the peer has queued data waiting for it to be compressed, framed and sent over the connection. Meanwhile, the other peer closes the connection. What should we do?
Currently the data processing keeps going as nothing happened and the callback of each enqueued send operation, if any, is invoked with an error when trying to write to the closed socket (after the 'close' event). This a waste of computational power. There is no reason to compress, frame, and try to send the data if we know beforehand that the socket is closed.
One way to work around the issue is to remove the enqueued send operations after invoking their callback with an error and before emitting the 'close' event.
The issue happens when a message is already being compressed so the queue should be cleared when compression completes.
Thoughts?
Reproducible in:
version: >=0.6.0
Node.js version(s): all
OS version(s): all
Description
permessage-deflate is enabled and one of the peer has queued data waiting for it to be compressed, framed and sent over the connection. Meanwhile, the other peer closes the connection. What should we do?
Currently the data processing keeps going as nothing happened and the callback of each enqueued send operation, if any, is invoked with an error when trying to write to the closed socket (after the
'close'
event). This a waste of computational power. There is no reason to compress, frame, and try to send the data if we know beforehand that the socket is closed.One way to work around the issue is to remove the enqueued send operations after invoking their callback with an error and before emitting the
'close'
event.The issue happens when a message is already being compressed so the queue should be cleared when compression completes.
Thoughts?
Reproducible in:
version: >=0.6.0
Node.js version(s): all
OS version(s): all
Steps to reproduce:
The text was updated successfully, but these errors were encountered: