socket - fix bug of socket_read with zero length return