summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-10 20:28:49 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-10 20:28:49 +0000
commitc5a46cebfc0bdb05255979f90b0140c445171914 (patch)
treebb878dc40b60c7739cc1eb5e0cc7ac4feb233f54 /usr.sbin/bgpd/session.c
parentdf01314dbb9d8b8eeb94af3b37d3286e261c14c3 (diff)
we are only interested in POLLOUT for a session socket when we either
have queued writes or the connection is not yet established - but certainly not if we ever had a queued write, forever... ok claudio@
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 3b0e7eccc46..fa67e9e46b1 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.80 2004/01/10 17:50:45 henning Exp $ */
+/* $OpenBSD: session.c,v 1.81 2004/01/10 20:28:48 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -268,7 +268,8 @@ session_main(struct bgpd_config *config, struct peer *cpeers, int pipe_m2s[2],
nextaction = p->IdleHoldResetTimer;
/* are we waiting for a write? */
- if (p->wbuf.queued > 0)
+ p->events = POLLIN;
+ if (p->wbuf.queued > 0 || p->state == STATE_CONNECT)
p->events |= POLLOUT;
/* poll events */