Commit 8b43d3f
committed
zlib: do not emit event on *Sync() methods
Asynchronous functions in `zlib` should not emit the close event.
This fixes an issue where asynchronous calls in a for loop could exhaust
memory because the pending event prevents the objects from being garbage
collected.
Fixes: #1668
PR-URL: #5707
Reviewed-By: jasnell - James M Snell <[email protected]>
Reviewed-By: trevnorris - Trevor Norris <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>1 parent a53b2ac commit 8b43d3f
2 files changed
+32
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
457 | 462 | | |
458 | 463 | | |
459 | 464 | | |
460 | | - | |
| 465 | + | |
461 | 466 | | |
462 | 467 | | |
463 | | - | |
| 468 | + | |
464 | 469 | | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
| 470 | + | |
| 471 | + | |
469 | 472 | | |
470 | 473 | | |
471 | 474 | | |
| |||
535 | 538 | | |
536 | 539 | | |
537 | 540 | | |
538 | | - | |
| 541 | + | |
539 | 542 | | |
540 | 543 | | |
541 | 544 | | |
542 | 545 | | |
543 | | - | |
| 546 | + | |
544 | 547 | | |
545 | 548 | | |
546 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
0 commit comments