diff options
Diffstat (limited to 'zebra/zserv.c')
| -rw-r--r-- | zebra/zserv.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index 6532491cef..f5bb3aabb7 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -773,6 +773,18 @@ static int zserv_accept(struct thread *thread) return 0; } +void zserv_close(void) +{ + /* + * On shutdown, let's close the socket down + * so that long running processes of killing the + * routing table doesn't leave us in a bad + * state where a client tries to reconnect + */ + close(zsock); + zsock = -1; +} + void zserv_start(char *path) { int ret; |
