Fixed socket client cannot detect remote socket closed