Commit cc3f80a
committed
Check event queue on null close
When calling _tcp_close_api, guarantee that no events for that client
remain in the queue, even if the pcb was shut down. This fixes a race
where an error callback is processed by the LwIP thread, invalidating
the pcb*, after the async thread has dequeued an event that will lead
to a close (such as a fin or final ack) but before close() is called.1 parent 15fc8ae commit cc3f80a
1 file changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
618 | 626 | | |
619 | 627 | | |
620 | 628 | | |
621 | | - | |
622 | | - | |
623 | 629 | | |
624 | 630 | | |
625 | 631 | | |
626 | 632 | | |
627 | 633 | | |
628 | 634 | | |
629 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
630 | 639 | | |
631 | 640 | | |
632 | 641 | | |
| |||
0 commit comments