]> git.bitcoin.ninja Git - rust-lightning/commit
Fix overflow in `awaiting_pong_timer...` with too many peers 2023-04-ping-count-overflow
authorMatt Corallo <git@bluematt.me>
Fri, 28 Apr 2023 16:19:04 +0000 (16:19 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 28 Apr 2023 16:19:04 +0000 (16:19 +0000)
commitfa33f98a4258e2f748bf200b8f05b8e9312f37f9
treea00cd9c519dddb83d902cf0753920ac78267706d
parent88c63e9dbb676d42dfa6ee2318e4535af83b31e3
Fix overflow in `awaiting_pong_timer...` with too many peers

If we have more than
127 / `MAX_BUFFER_DRAIN_TICK_INTERVALS_PER_PEER` (31) peers,
`awaiting_pong_timer_tick_intervals` can overflow before we hit
the limit. This isn't super harmful, we'll still disconnect peers
as long as they don't send *any* messages between two pings, but it
does cause us to not disconnect peers which are extremely slow in
responding to messages, e.g. because they are overloaded.
lightning/src/ln/peer_handler.rs