mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 18:27:21 +00:00
bgpd: stop pseudo-blocking in bgp_write
If write() indicates that we should retry, just move along to the next peer and come back later. No need to burn write() in a loop. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
419dfe6a70
commit
2bb745fe02
@ -2202,10 +2202,9 @@ static int bgp_write(struct peer *peer)
|
||||
num = write(peer->fd, STREAM_PNT(s), writenum);
|
||||
|
||||
if (num < 0) {
|
||||
if (ERRNO_IO_RETRY(errno))
|
||||
continue;
|
||||
|
||||
if (!ERRNO_IO_RETRY(errno))
|
||||
BGP_EVENT_ADD(peer, TCP_fatal_error);
|
||||
|
||||
goto done;
|
||||
} else if (num != writenum) // incomplete write
|
||||
stream_forward_getp(s, num);
|
||||
|
Loading…
Reference in New Issue
Block a user