Add close socket in the client