sproutsocial / nsq-j

Java client for the NSQ realtime distributed messaging platform
MIT License
73 stars 25 forks source link

DP-44: Don't attempt to read the response from nsqd on CLS command #67

Closed blakesmith closed 9 months ago

blakesmith commented 9 months ago

The read loop on another thread will read the CLOSE_WAIT response from the server, and so our flushAndReadResponse call might block waiting for a response for up to ~35 seconds (The default heartbeat connection timeout).

Instead, just fire off the write command, and then have the read loop handle stopping the loop correctly.