health: Support client disconnect

If the client exists, it shall sent a disconnect message to the server
that handle this task properly.

In fact, the socket reference on the server side was deleted before
closing the socket.