Safe disconnect. Socket properly closed. Check at every send if the server is still alive