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

FD leak in connectFTP #22

Open
defanor opened this issue Sep 10, 2019 · 1 comment
Open

FD leak in connectFTP #22

defanor opened this issue Sep 10, 2019 · 1 comment

Comments

@defanor
Copy link

defanor commented Sep 10, 2019

connectFTP doesn't close sockets on connection failure, only throwing an exception. I'm not sure whether it would be more appropriate to fix in connectFTP itself or in MissingH's connectTCP/connectTCPAddr (since it's not clear what is the intended behaviour of connectTCP), but in programs using connectFTP there's no socket to close, so apparently should be fixed in one of those.

@defanor
Copy link
Author

defanor commented Sep 11, 2019

Although it looks like connectTCPAddr should handle that, since leaking file descriptors from it doesn't seem like a sensible behaviour. Submitted a PR there, and perhaps ftphs should just increase the required MissingH version once/if it will be fixed there.

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

No branches or pull requests

1 participant