From 4f2ed15b48e67a5b76227f42e44b46ac3042c3d5 Mon Sep 17 00:00:00 2001 From: Joseph Oravec Date: Fri, 3 May 2024 14:05:34 -0400 Subject: [PATCH] elminate tce restart on SubscribeNak When resuming from suspend-to-ram it's likely that UDP SOME-IP works but the TCP socket got broken. Until a new TCP socket gets established, the remote end responds SubscribeNak. The handler will call restart() restart() will early terminate 5 times total. Thereafter it will call shutdown_and_close_socket_unlocked. This is really expensive if the node sends thousands of total requests before a TCP socket gets established. Options include: 1. do not call restart() at all on SubscribeNak. seems safe? 2. fix restart() to early-terminate better in this state, more than 5x 3. ensure that SOMEIP-SD is inhibited in this state (suspend routing?) This commit implements #1 but the others might be alternatives --- .../service_discovery/src/service_discovery_impl.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/implementation/service_discovery/src/service_discovery_impl.cpp b/implementation/service_discovery/src/service_discovery_impl.cpp index de6e8467c..44a8a07f5 100644 --- a/implementation/service_discovery/src/service_discovery_impl.cpp +++ b/implementation/service_discovery/src/service_discovery_impl.cpp @@ -2510,13 +2510,6 @@ service_discovery_impl::handle_eventgroup_subscription_nack( _service, _instance, _eventgroup, ANY_EVENT, PENDING_SUBSCRIPTION_ID); // TODO: This is a dummy call... } - - - if (!its_subscription->is_selective()) { - auto its_reliable = its_subscription->get_endpoint(true); - if (its_reliable) - its_reliable->restart(); - } } } }