* Fix#1041
* Fixed problem with is_socket_alive
* Adjust the way to check if the sockt is still alive.
* Revert "Adjust the way to check if the sockt is still alive."
This reverts commit 6c673b21e5439087e3cdc9c3dd39eba2d99928c8.
* Adjust is_socket_alive according to the code review