vcl: switch to closed state after app close

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I851db474538de76d5f70dd6d6f83a6487a5a02bd
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 916ddf9..892d65c 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -60,8 +60,8 @@
 
   switch (state)
     {
-    case STATE_START:
-      st = "STATE_START";
+    case STATE_CLOSED:
+      st = "STATE_CLOSED";
       break;
 
     case STATE_CONNECT:
@@ -1220,7 +1220,7 @@
   session = vcl_session_alloc (wrk);
 
   session->session_type = proto;
-  session->session_state = STATE_START;
+  session->session_state = STATE_CLOSED;
   session->vpp_handle = ~0;
   session->is_dgram = vcl_proto_is_dgram (proto);
 
@@ -1309,6 +1309,8 @@
 				    session->vpp_handle, 0);
     }
 
+  session->session_state = STATE_CLOSED;
+
   /* Session is removed only after vpp confirms the disconnect */
   return rv;