Fix a crash way in TCPServer class