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

ref: close handle only if active - #234

Merged
JonasBa merged 3 commits into
mainfrom
jb/fix/handle-clode
Jan 11, 2024
Merged

ref: close handle only if active#234
JonasBa merged 3 commits into
mainfrom
jb/fix/handle-clode

Conversation

@JonasBa

@JonasBaJonasBa commented Jan 11, 2024

Copy link
Copy Markdown
Contributor

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 anonrigJanuary 11, 2024 12:08

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

if (uv_is_active(handle)) {

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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 mainJan 11, 2024
@JonasBa
JonasBa deleted the jb/fix/handle-clode branch January 11, 2024 12:41
Sign up for freeto 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

@JonasBa@anonrig