session: fix duplicate segment del message
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I42b5a5a07aae6708a20ed424c8f26ddbe91278fb
diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c
index eb1c258..1bf5d93 100644
--- a/src/vnet/session/application_local.c
+++ b/src/vnet/session/application_local.c
@@ -304,12 +304,7 @@
app_worker_del_segment_notify (app_wrk, ct->segment_handle);
}
- if (!segment_manager_app_detached (sm))
- {
- app_wrk = app_worker_get (ct->server_wrk);
- app_worker_del_segment_notify (app_wrk, ct->segment_handle);
- }
-
+ /* Notify server app and free segment */
segment_manager_lock_and_del_segment (sm, seg_index);
/* Cleanup segment manager if needed. If server detaches there's a chance