summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vty/vty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c
index a96d86ce..aa23fa00 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -205,6 +205,9 @@ void vty_close(struct vty *vty)
{
int i;
+ /* VTY_CLOSED is handled by the telnet_interface */
+ vty_event(VTY_CLOSED, vty->fd, vty);
+
if (vty->obuf) {
/* Flush buffer. */
buffer_flush_all(vty->obuf, vty->fd);
@@ -236,9 +239,6 @@ void vty_close(struct vty *vty)
/* Check configure. */
vty_config_unlock(vty);
- /* VTY_CLOSED is handled by the telnet_interface */
- vty_event(VTY_CLOSED, vty->fd, vty);
-
/* OK free vty. */
talloc_free(vty);
}