fixed small crash bug in ClientSocket.c:socket_loop