fix socket when a client is disconnected