Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for epoll backend: use duplicated fd #75

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

Corendos
Copy link
Contributor

@Corendos Corendos commented Nov 7, 2023

Description

While playing with cancellation on an old machine not supporting io_uring, I noticed that it was using the original fd, thus causing a error.FileDescriptorNotRegistered to appear.

Solution

Use the duplicated fd if the completion.flags.dup boolean is set, otherwise fallback to the completion.fd function.

@mitchellh mitchellh merged commit 04f21b9 into mitchellh:main Nov 7, 2023
10 checks passed
@mitchellh
Copy link
Owner

Thanks!

@Corendos Corendos deleted the fix/duplicated_fd_cancel branch December 17, 2023 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants