Fixed by letting the server-side closing the socket on disconnection signal. The client just does not nothing, just waits the server to close and delete the QLocalSocket pointer on disconnection.

Thanks, anyway.