Revert "Close socket when lost connection."

This reverts commit 5c226cb659ab3de12b24ccddffa98d06f411fee9.