diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-04-06 11:57:28 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2016-04-06 11:57:28 +0200 |
commit | bd22d7f41d37dec8f7b8b845f6a18c775e66ddfc (patch) | |
tree | eef231c9251a15f4fa58f183154ed97a7607b04a /proto/bgp/bgp.c | |
parent | 9e7b3ebdf9556d7464911dd39e862b1c003319b3 (diff) |
IO: Avoid multiple event cycles in one loop cycle.
Event cycle may took too much time and trigger next timer events, so
avoid cycling between timer and event cycles inside the loop cycle.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r-- | proto/bgp/bgp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 7328cb79..94c8e5c2 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -668,6 +668,10 @@ bgp_keepalive_timeout(timer *t) DBG("BGP: Keepalive timer\n"); bgp_schedule_packet(conn, PKT_KEEPALIVE); + + /* Kick TX a bit faster */ + if (ev_active(conn->tx_ev)) + ev_run(conn->tx_ev); } static void |