The issue is that libuv will under some circumstances call the read callback with an nread of 0 (deliberately the number 0), which we interpret as an error.
The Solution™ is either to not call async_read at all when nread is 0, or to just return early from async_read when nread is 0.