Fix Bug with timeout recv

when the client recieves timeout, it doesn't recv next block - now it does.
a little code cleanup