refactor(client): Also timeout subscriptions when the Session is not activated

This commit is contained in:
Julius Pfrommer
2025-06-04 15:32:47 +02:00
committed by Julius Pfrommer
parent edfcb4a6bf
commit be62f5700a
2 changed files with 1 additions and 8 deletions
-7
View File
@@ -1442,13 +1442,6 @@ void
__Client_Subscriptions_backgroundPublishInactivityCheck(UA_Client *client) {
UA_LOCK_ASSERT(&client->clientMutex);
if(client->sessionState < UA_SESSIONSTATE_ACTIVATED)
return;
/* Is the lack of responses the client's fault? */
if(client->currentlyOutStandingPublishRequests == 0)
return;
UA_EventLoop *el = client->config.eventLoop;
UA_DateTime nowm = el->dateTime_nowMonotonic(el);
+1 -1
View File
@@ -1389,7 +1389,7 @@ START_TEST(Client_subscription_async_sub) {
/* Simulate network cable unplugged (no response from server) */
UA_ConnectionManager *cm = client->channel.connectionManager;
cm->closeConnection(cm, client->channel.connectionId);
UA_fakeSleep((UA_UInt32)publishingInterval * 100);
UA_fakeSleep((UA_UInt32)cc->timeout * 2);
ck_assert_uint_lt(client->config.outStandingPublishRequests, 10);
ck_assert_uint_eq(inactivityCallbackCalled, false);