session: detach session from app on cleanup 86/28386/1
authorFlorin Coras <fcoras@cisco.com>
Tue, 14 Apr 2020 23:52:12 +0000 (23:52 +0000)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 13 Aug 2020 17:20:47 +0000 (17:20 +0000)
Type: fix

Avoids unwanted notifications.

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ifff27fb0d3644194e3bb3f91d7ed1fd02c6730cd
(cherry picked from commit 77ea42b31ae12f0aef829097225e353199360f30)

src/vnet/session/segment_manager.c

index 9c33e35..3edf0dd 100644 (file)
@@ -503,7 +503,12 @@ segment_manager_del_sessions (segment_manager_t * sm)
   /* *INDENT-ON* */
 
   vec_foreach (handle, handles)
-    session_close (session_get_from_handle (*handle));
+  {
+    session = session_get_from_handle (*handle);
+    session_close (session);
+    /* Avoid propagating notifications back to the app */
+    session->app_wrk_index = APP_INVALID_INDEX;
+  }
 }
 
 int