diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-19 11:25:19 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-19 11:25:19 +0000 |
commit | 36e46b89b673f16f641c6ccb6afd2eb2913d8fbc (patch) | |
tree | 0404b471ab08f97f2fd1df611122fc7154b7653a | |
parent | b91a8ff757a7d0ac997addcb80bc0276a22c371c (diff) |
don't bother sending a SESSION_DOWN imsg to the RDE if we are quitting, this
is at best pointless and usually just causes a fatal() when we try to send it
as the pipe is already closed by the RDE then. this way we can at least finish
the cleanup work, including notifications to the peers about us leaving.
-rw-r--r-- | usr.sbin/bgpd/session.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 91dccc9ce2f..f7545e9336d 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.6 2003/12/19 11:19:02 henning Exp $ */ +/* $OpenBSD: session.c,v 1.7 2003/12/19 11:25:18 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -1311,8 +1311,9 @@ session_write_imsg(int fd) void session_down(struct peer *peer) { - s2r_queued_writes += imsg_compose(s2r_sock, IMSG_SESSION_DOWN, - peer->conf.id, NULL, 0); + if (!session_quit) + s2r_queued_writes += imsg_compose(s2r_sock, IMSG_SESSION_DOWN, + peer->conf.id, NULL, 0); } void |