session: fix first segment manager cleanup

Change-Id: I750db7617ff9fd36647743094e0fa855e7dada86
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 372a6f9..83b96d3 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -760,6 +760,8 @@
   stream_session_t *s;
 
   s = session_get (tc->s_index, tc->thread_index);
+  if (s->session_state >= SESSION_STATE_TRANSPORT_CLOSING)
+    return;
   s->session_state = SESSION_STATE_TRANSPORT_CLOSING;
   app_wrk = app_worker_get_if_valid (s->app_wrk_index);
   if (!app_wrk)