diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-08-05 10:26:23 -0700 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2011-03-21 17:30:52 +0000 |
commit | 35398589cf1293956dfefb5096aa5284c72a696f (patch) | |
tree | a0d844e42273fd0ee217652a6fd33552661f8b6f /bgpd/bgp_network.c | |
parent | 2c9fd7e07283b8904ef20030c9dadb032e999b12 (diff) |
bgpd: leave peer socket in non-blocking mode (mostly)
* bgpd: Rather than toggling socket in/out of non-block mode, just leave it
in nonblocking mode.
One exception is in bgp_notify which only happens just before close.
Diffstat (limited to 'bgpd/bgp_network.c')
-rw-r--r-- | bgpd/bgp_network.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 9e3427d2..4c79aa63 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -150,6 +150,7 @@ bgp_accept (struct thread *thread) zlog_err ("[Error] BGP socket accept failed (%s)", safe_strerror (errno)); return -1; } + set_nonblocking (bgp_sock); if (BGP_DEBUG (events, EVENTS)) zlog_debug ("[Event] BGP connection from host %s", inet_sutop (&su, buf)); |