Skip to content

Conversation

yyforyongyu
Copy link
Owner

Both read and write share the same idle timer, since we only care about whether the connection is idle or not but not the read or write process.

This commit changes the ping/pong mechanism used for liveness check.
Previously we will always fire a ping every minute, even we know for
sure the connection is alive as we are busy processing other messages
like gossip updates. We now only fire a ping if we haven't received any
messages from the peer after one minute.
Similar to how we delay sending pings on successful reads, we now delay
sending pings if we know the connection is up and alive for writes.
Such that a busy reading won't make the writeHandler to time out.
Copy link

Pull reviewers stats

Stats of the last 30 days for lnd:

User Total reviews Time to review Total comments
ziggie1984
🥇
1
▀▀▀▀▀▀▀▀▀▀
54m
▀▀▀▀▀▀▀▀▀▀
1
▀▀▀▀▀▀▀▀▀▀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant