Fix #9 and also partial send/recv discards on timeout.