Commit 27df434
committed
fix: when kill a connection, it have a change make the killed thread wait forever
the killer thread:
shutdown the killed thread vio, this action will close the connection fd and remove the fd from the red-black tree of the epoll_wait fd
the killed thread:
first run the start_io function, this function will bind the connection fd to the epoll_wait fd.
second the connection wait from the epoll_wait
when worker thread process a connection, first bind the connection fd to the epoll_wait fd, then killer thread close the connection fd, which
will make the killed connection have no change to run any more.1 parent cc63c04 commit 27df434
3 files changed
+32
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
410 | 414 | | |
411 | 415 | | |
412 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| 715 | + | |
| 716 | + | |
715 | 717 | | |
716 | 718 | | |
717 | 719 | | |
| |||
724 | 726 | | |
725 | 727 | | |
726 | 728 | | |
| 729 | + | |
| 730 | + | |
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
| |||
1403 | 1407 | | |
1404 | 1408 | | |
1405 | 1409 | | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
1406 | 1418 | | |
1407 | 1419 | | |
1408 | 1420 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
530 | 539 | | |
531 | 540 | | |
532 | 541 | | |
| |||
553 | 562 | | |
554 | 563 | | |
555 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
556 | 572 | | |
557 | 573 | | |
558 | 574 | | |
| |||
0 commit comments