Skip to content

socket closed after UnixStream::into_raw_fd() #147

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

Closed
yshui opened this issue Sep 5, 2019 · 2 comments · Fixed by #148
Closed

socket closed after UnixStream::into_raw_fd() #147

yshui opened this issue Sep 5, 2019 · 2 comments · Fixed by #148

Comments

@yshui
Copy link
Contributor

yshui commented Sep 5, 2019

UnixStream holds a IoHandle<mio_uds::UnixStream> which is not correctly disposed of in into_raw_fd, resulting in the returned file descriptor being closed when into_raw_fd returns, making the function useless.

@yshui
Copy link
Contributor Author

yshui commented Sep 5, 2019

I think the best way is to
impl<T: IntoRawFd> IntoRawFd for IoHandle<T> and use that, instead of keeping a copy of the RawFd.

@yshui
Copy link
Contributor Author

yshui commented Aug 18, 2020

This bug is reintroduced..

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 a pull request may close this issue.

1 participant