Fixed TCP packet data corruption in non-blocking mode (#402, #119)