Fix stcp_socket read when partial buffer is read.