File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,14 @@ void RpcBase::stop()
272272 }
273273}
274274
275+ /* * @brief Process the websocket disconnection event */
276+ void RpcBase::processDisconnected ()
277+ {
278+ // Disable queues
279+ m_requests_queue.setEnable (false );
280+ m_results_queue.setEnable (false );
281+ }
282+
275283/* * @brief Process received data */
276284void RpcBase::processReceivedData (const void * data, size_t size)
277285{
Original file line number Diff line number Diff line change @@ -124,6 +124,8 @@ class RpcBase : public IRpc
124124 void start ();
125125 /* * @brief Stop RPC operations */
126126 void stop ();
127+ /* * @brief Process the websocket disconnection event */
128+ void processDisconnected ();
127129 /* * @brief Process received data */
128130 void processReceivedData (const void * data, size_t size);
129131 /* * @brief Get the RPC listener */
Original file line number Diff line number Diff line change @@ -173,6 +173,10 @@ bool RpcServer::Client::isConnected() const
173173/* * @brief void IWebsocketServer::IClient::IListener::wsClientDisconnected() */
174174void RpcServer::Client::wsClientDisconnected ()
175175{
176+ // Process disconnection event
177+ processDisconnected ();
178+
179+ // Notify listener
176180 rpcListener ()->rpcDisconnected ();
177181}
178182
You can’t perform that action at this time.
0 commit comments