summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>2017-06-27 10:47:45 -0500
committerGitHub <noreply@github.com>2017-06-27 10:47:45 -0500
commit43d372ece453a1eb1aafb4ad045d8d5149924690 (patch)
tree4b53ce504d57ae5ac66d3f5474d7b19e7bd038cf
parent42fa8b00deb1fdc87a57bb82b739287688e5d383 (diff)
parente82a17c61b49e4bfa462bceac08ed7ae2a54e254 (diff)
Merge pull request #748 from qlyoung/fix-vtysh-exit
lib: actually exit when asked to 'do' so
-rw-r--r--lib/vty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 19f9223d37..54a5f727e1 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2212,7 +2212,10 @@ vtysh_read (struct thread *thread)
}
}
- vty_event (VTYSH_READ, sock, vty);
+ if (vty->status == VTY_CLOSE)
+ vty_close (vty);
+ else
+ vty_event (VTYSH_READ, sock, vty);
return 0;
}