Commit 300673c
authored
yamux/control: Ensure poll next inbound is not called after errors (#445)
We have recently fixed a spurious issue that caused the rust-yamux
component to panic.
Litep2p transitioned the internal state of the connection back to Idle.
This causes litep2p to poll the component again. Then rust-yamux would
use the same buffer offset that caused the panic in the first place.
Instead, this PR ensures that litep2p never polls the connection once
yamux encounters an error.
This is aligned with the behavior of transport layers that close the
connection on the first yamux error.
Part of: paritytech/polkadot-sdk#9169
cc @paritytech/networking
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>1 parent 5a09ff9 commit 300673c
2 files changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
85 | 105 | | |
86 | 106 | | |
87 | 107 | | |
| |||
191 | 211 | | |
192 | 212 | | |
193 | 213 | | |
194 | | - | |
| 214 | + | |
195 | 215 | | |
196 | 216 | | |
197 | 217 | | |
| |||
0 commit comments