Commit 8aaeba4
authored
protocol: Ensure transport manager knows about closed connections (#515)
This PR improves the connection management robustness by ensuring that
the closed connections are reported.
If a registered protocol could not receive the
`InnerTransportEvent::ConnectionClosed` the function would fail to
inform the transport manager. This would cause litep2p to think that the
connection is still active, while the async task of the raw socket would
exit immediately after the function call.
The PR makes sure are not returning on the first encountered error and
switch to a best-effort approach.
---------
Signed-off-by: Alexandru Vasile <[email protected]>1 parent 4ce2fbe commit 8aaeba4
1 file changed
+28
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | | - | |
| 399 | + | |
| 400 | + | |
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
408 | 418 | | |
409 | 419 | | |
410 | 420 | | |
| 421 | + | |
| 422 | + | |
411 | 423 | | |
412 | | - | |
413 | | - | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
414 | 428 | | |
415 | 429 | | |
416 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
417 | 434 | | |
418 | 435 | | |
419 | 436 | | |
420 | 437 | | |
421 | 438 | | |
422 | | - | |
423 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
424 | 446 | | |
425 | 447 | | |
426 | 448 | | |
| |||
0 commit comments