IOV buffers lost when sendmsg() doesn't send all IOV buffers.

When sendmsg() stops sending on a IOV boundary, the other IOV buffers are lost.

Also when recv() returns 0 the connection is closed.