session: handle accept and connect errors
If builtin apps refuse connections, they should be cleaned up.
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I95ef22902ac3fe873e15e250aa5f03031c2dc0c4
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 4f2cae4..d27b804 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -456,6 +456,7 @@
a->app_index = mp->context;
a->handle = mp->handle;
vnet_disconnect_session (a);
+ s->app_wrk_index = SESSION_INVALID_INDEX;
return;
}