mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-21 22:07:03 +00:00
Poll errors must also drop a corefile. And we shouldn't run sockets when sockets have changed
This commit is contained in:
parent
4d687d7aec
commit
e1701128bf
@ -367,7 +367,7 @@ sockets_fire(struct birdloop *loop)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (pfd->revents & POLLNVAL)
|
if (pfd->revents & POLLNVAL)
|
||||||
die("poll: invalid fd %d", pfd->fd);
|
bug("poll: invalid fd %d", pfd->fd);
|
||||||
|
|
||||||
if (pfd->revents & POLLIN)
|
if (pfd->revents & POLLIN)
|
||||||
while (e && *psk && (*psk)->rx_hook)
|
while (e && *psk && (*psk)->rx_hook)
|
||||||
@ -602,7 +602,7 @@ birdloop_main(void *arg)
|
|||||||
{
|
{
|
||||||
if (errno == EINTR || errno == EAGAIN)
|
if (errno == EINTR || errno == EAGAIN)
|
||||||
goto try;
|
goto try;
|
||||||
die("poll: %m");
|
bug("poll: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
birdloop_enter(loop);
|
birdloop_enter(loop);
|
||||||
@ -615,7 +615,7 @@ birdloop_main(void *arg)
|
|||||||
|
|
||||||
loop_begin = current_time();
|
loop_begin = current_time();
|
||||||
|
|
||||||
if (rv)
|
if (rv && !loop->poll_changed)
|
||||||
sockets_fire(loop);
|
sockets_fire(loop);
|
||||||
|
|
||||||
atomic_exchange_explicit(&loop->ping_sent, 0, memory_order_acq_rel);
|
atomic_exchange_explicit(&loop->ping_sent, 0, memory_order_acq_rel);
|
||||||
|
@ -2315,7 +2315,7 @@ io_loop(void)
|
|||||||
{
|
{
|
||||||
if (errno == EINTR || errno == EAGAIN)
|
if (errno == EINTR || errno == EAGAIN)
|
||||||
continue;
|
continue;
|
||||||
die("poll: %m");
|
bug("poll: %m");
|
||||||
}
|
}
|
||||||
if (pout)
|
if (pout)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user