Sloved a socket-error problem , when socket error happened, some cleaning works should be done immediately