You can make a send disconnect function on your client side, where you send the disconnect code. When the server receives it, it deletes that client. You would call it in a destructor or when closing your game.
Other way would be to create a ping function, where you ping the server from the client. Then create a timeout variable for each client on your server side, where you track the how long has it been since last ping. If it was more that x time, you delete that client.
Or you could ping the client from the server, and if the status of the send ping function is sf::Socket::Disconnected, just delete the client.
There are probably more ways, I am using the first and the second one.
The second one is also useful if you want to display the ping on the client game.