Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

ref: close handle only if active #234

Merged
merged 3 commits into from
Jan 11, 2024
Merged

ref: close handle only if active #234

merged 3 commits into from
Jan 11, 2024

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented Jan 11, 2024

Having a bit of a hard time fixing this, though it seems like this occurs if we attempt to close an inactive handle. Added uv_is_active before calling close.

Fixes #233

@JonasBa JonasBa requested a review from anonrig January 11, 2024 12:08

auto handle = reinterpret_cast<uv_handle_t *>(&timer);

if (uv_is_active(handle)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment to here? Why are we doing this?

Also:

Suggested change
if (uv_is_active(handle)) {
if (uv_is_active(handle)) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anonrig ofc, yes!

@JonasBa JonasBa merged commit e5e186c into main Jan 11, 2024
34 checks passed
@JonasBa JonasBa deleted the jb/fix/handle-clode branch January 11, 2024 12:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install 1.3.3 on docker node:20-alpine image
2 participants