socket.readall return false when disconnected