Make sure the client socket exist before emitting