mirror of
https://github.com/open62541/open62541.git
synced 2026-10-29 05:11:36 +08:00
refactor(client): Also timeout subscriptions when the Session is not activated
This commit is contained in:
committed by
Julius Pfrommer
parent
edfcb4a6bf
commit
be62f5700a
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user