src: fix libuv assertion on windows#61999
Conversation
Set the pointer to `nullptr` after calling `uv_close` to avoid assertions. Fixes: nodejs#56645
53bbcc6 to
b721fef
Compare
|
That handle is gonna leak, and I don't think it's gonna fix anything. This looks pretty much a AI-generated solution... that does actually nothing regarding your intention. 💔 |
|
This is not an AI-generated solution, it's an inspiration I got from other code. Lines 411 to 436 in a8eb690 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #61999 +/- ##
==========================================
- Coverage 89.77% 89.73% -0.05%
==========================================
Files 674 676 +2
Lines 205705 205987 +282
Branches 39449 39487 +38
==========================================
+ Hits 184670 184833 +163
- Misses 13280 13300 +20
- Partials 7755 7854 +99
🚀 New features to boost your workflow:
|
My bad... but sadly still... I don't think this is gonna fix the fundamental problem at all and still leaking. |
| double delay_in_seconds) { | ||
| auto locked = tasks_.Lock(); | ||
|
|
||
| if (flush_tasks_ == nullptr) return; |
There was a problem hiding this comment.
If "just not sending" is indeed a valid solution to this issue (which I have not verified), you could set a boolean flag next to flush_tasks_ instead of making it a heap-allocated variable
Set the pointer to
nullptrafter callinguv_closeto avoid assertions.Fixes: #56645