Fixed reactor infinite loop
Fixed reactor infinite loop

Apparently, in some cases a non-blocking write to a socket in Linux can
return with 0 bytes written instead of returning an error of EAGAIN,
EINTR, or EWOULDBLOCK. In the Reactor when we were flushing output
to a socket we would loop until it's all written, but if no progress
is being made then we loop forever.

The case returning 0 bytes may be a closed socket...

jeffwilliams/quartz-torrent