diff --git a/src/comm/TCPLink.cc b/src/comm/TCPLink.cc index 9cef75e10ec5932653b5701e1bbf227f6572a00e..51c222348af279a6c08be4f32b86a1f50bf59d9e 100644 --- a/src/comm/TCPLink.cc +++ b/src/comm/TCPLink.cc @@ -199,7 +199,7 @@ bool TCPLink::disconnect() if (_socket) { _socketIsConnected = false; - delete _socket; + _socket->deleteLater(); // Make sure delete happens on correct thread _socket = NULL; emit disconnected();