dudleycarr / nsqjs

NodeJS client library for NSQ
https://nsqjs.com
MIT License
557 stars 76 forks source link

Refactor compression start. Fix race processing race condition. #353

Closed dudleycarr closed 3 years ago

dudleycarr commented 3 years ago

Refactored the handling of compression start for deflate and snappy.

Fixed a race condition processing issue. Without the setImmedate around the processing of the buffered compressed content, receivedData would be called while a frame was being processed leading to connection hanging.