summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}