diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-23 18:41:33 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-23 18:41:33 +0000 |
commit | e304c541d2e903bbe4b30f587adb22c24ef49288 (patch) | |
tree | 23bc663073738d58787b4613c6c68247f59a9f39 /usr.sbin/bgpd | |
parent | b6c69be74bf645bc3a3321ca0cf25e76d94b2d4c (diff) |
play nice on exit (when he listening coket is closed)
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r-- | usr.sbin/bgpd/session.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index 146daab0d4c..eabb57d0af2 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.30 2003/12/23 18:28:05 henning Exp $ */ +/* $OpenBSD: session.c,v 1.31 2003/12/23 18:41:32 henning Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -176,10 +176,8 @@ session_main(struct bgpd_config *config, int pipe_m2s[2], int pipe_s2r[2]) while (session_quit == 0) { bzero(&pfd, sizeof(pfd)); - if (sock != -1) { - pfd[PFD_LISTEN].fd = sock; - pfd[PFD_LISTEN].events = POLLIN; - } + pfd[PFD_LISTEN].fd = sock; + pfd[PFD_LISTEN].events = POLLIN; pfd[PFD_PIPE_MAIN].fd = ibuf_main.sock; pfd[PFD_PIPE_MAIN].events = POLLIN; pfd[PFD_PIPE_ROUTE].fd = ibuf_rde.sock; |