Fixed bug

"Server will close after receiving the first msg"