Skip to content

Commit d12e84b

Browse files
committed
lib: close vty's before destroying mgmt client connection.
- Need to vty_close vtys before we cleanup the mgmt client sessions associated with those vtys. Signed-off-by: Christian Hopps <chopps@labn.net>
1 parent 95306e2 commit d12e84b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/vty.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4154,11 +4154,6 @@ void vty_terminate(void)
41544154
{
41554155
struct vty *vty;
41564156

4157-
if (mgmt_fe_client) {
4158-
mgmt_fe_client_destroy(mgmt_fe_client);
4159-
mgmt_fe_client = NULL;
4160-
}
4161-
41624157
memset(vty_cwd, 0x00, sizeof(vty_cwd));
41634158

41644159
vty_reset();
@@ -4178,5 +4173,10 @@ void vty_terminate(void)
41784173
vtys_fini(vtysh_sessions);
41794174
vtys_init(vtysh_sessions);
41804175

4176+
if (mgmt_fe_client) {
4177+
mgmt_fe_client_destroy(mgmt_fe_client);
4178+
mgmt_fe_client = NULL;
4179+
}
4180+
41814181
vty_serv_stop();
41824182
}

0 commit comments

Comments
 (0)