killed thread now when socket closed