Commit 370459c
Fupan Li
sync: fix the connection fd leak on the server side
We need to ensure that only when the connection is successfully
inserted into the connections map can the handler send fd
to notify the reaper to recycle the connection.
Otherwise, the handler may have been executed and sent fd to notify
the reaper to recycle the connection, and the connection has
not been inserted into the map. Then the reaper cannot find the corresponding
connection after receiving the fd, and loses the opportunity to recycle the
connection, causing fd leakage;
Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>1 parent 4929e90 commit 370459c
1 file changed
+29
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
405 | 407 | | |
406 | 408 | | |
407 | 409 | | |
| |||
505 | 507 | | |
506 | 508 | | |
507 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
508 | 514 | | |
509 | 515 | | |
510 | 516 | | |
511 | 517 | | |
512 | 518 | | |
513 | 519 | | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
527 | 542 | | |
528 | 543 | | |
529 | 544 | | |
| |||
0 commit comments