Commit 41e1297
committed
peer: make ping manager send sync
In this commit, we make the ping manager sync blocking. This ensures
that we don't start the ping timer until after we've actually sent out
the ping on the wire. Otherwise, it's possible that if processing the
normal outgoing queue is very delayed, that we expire the ping timer
before we even send anything out to the remote peer.
We also increase the msg size buffer. As otherwise, due to TCP head of
the line blocking, we can still timeout the ping sends if we're just
waiting for the remote party to receive the ping in the first place
after a flurry of sends.1 parent 67a40c9 commit 41e1297
2 files changed
+13
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
733 | 733 | | |
734 | 734 | | |
735 | 735 | | |
736 | | - | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
737 | 745 | | |
738 | 746 | | |
739 | 747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
152 | | - | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
0 commit comments