Fixed a crash bug of the tcp server on windows platform.

Refresh the web page constantly, HTTP server unresponsive.