Skip to content

Commit

Permalink
Reset comminication before socket is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr committed Sep 2, 2024
1 parent cdbac87 commit 7e6a23a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libshviotqt/src/rpc/clientconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ void ClientConnection::closeOrAbort(bool is_abort)
shvInfo() << "close connection, abort:" << is_abort;
m_checkBrokerConnectedTimer->stop();
if(m_socket) {
m_socket->resetCommunication();

if(is_abort)
abortSocket();
else
Expand Down Expand Up @@ -439,7 +441,6 @@ void ClientConnection::onSocketConnectedChanged(bool is_connected)
}
else {
shvInfo() << objectName() << "connection id:" << connectionId() << "Socket disconnected from RPC server";
socket()->resetCommunication();
setState(State::NotConnected);
}
}
Expand Down

0 comments on commit 7e6a23a

Please sign in to comment.