SIGN IN SIGN UP

Fix leafnode reconnect stall after compressed write timeout

After a partial write, the pending-byte count includes both leftover
compressed data and new data waiting to be compressed. The compression
code subtracted that entire count when replacing the new data with its
compressed form, losing track of the leftovers. This could cause the
write counts to go negative, which would stall the connection.

Signed-off-by: Neil Twigg <neil@nats.io>
N
Neil Twigg committed
f4b62af6e6eb3fa9c03643ec5c66e665bc64ce2b
Parent: af25971