From 234fc3c31e751f8191b9b78fa5fd16663c2627fe Mon Sep 17 00:00:00 2001 From: Emeric Brun Date: Wed, 16 Dec 2015 15:16:46 +0100 Subject: [PATCH] BUG/MEDIUM: peers: table entries learned from a remote are pushed to others after a random delay. New sticktable entries learned from a remote peer can be pushed to others after a random delay because they are not inserted at the right position in the updates tree. --- src/peers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/peers.c b/src/peers.c index 1e661159e9..295a0a5a42 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1092,7 +1092,7 @@ static void peer_io_handler(struct appctx *appctx) ts = stktable_store(st->table, newts, 0); newts = NULL; /* don't reuse it */ - ts->upd.key= (++st->table->update)+(2^31); + ts->upd.key= (++st->table->update)+(2147483648U); eb = eb32_insert(&st->table->updates, &ts->upd); if (eb != &ts->upd) { eb32_delete(eb); @@ -1555,7 +1555,6 @@ static void peer_io_handler(struct appctx *appctx) } case PEER_SESS_ST_EXIT: repl = snprintf(trash.str, trash.size, "%d\n", appctx->st1); - if (bi_putblk(si_ic(si), trash.str, repl) == -1) goto full; appctx->st0 = PEER_SESS_ST_END;