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

[Feature Request] - Timeouts for active data connection acceptance #64

Closed
defanor opened this issue Dec 1, 2023 · 1 comment · Fixed by #68
Closed

[Feature Request] - Timeouts for active data connection acceptance #64

defanor opened this issue Dec 1, 2023 · 1 comment · Fixed by #68
Assignees
Labels
new feature A new feature request

Comments

@defanor
Copy link

defanor commented Dec 1, 2023

Description

When active data connections are configured to be used, currently FtpStream waits for an incoming connection indefinitely, while it may never happen, leading to a program hanging. Would be nice if it was possible to set a timeout.

Changes

The following changes to the application are expected

  • A data connection acceptance timeout setting and a handling of that setting.
  • Perhaps a similar one for passive connections: currently there is the connect_timeout function for control channel connection, but data channel in passive mode always uses plain connect.

Implementation

Once a setting is introduced, select or something along those lines can be called with a timeout, only calling accept when there is something to accept. For passive mode, TcpStream::connect_timeout can be used, as for the control channel.

@defanor defanor added the new feature A new feature request label Dec 1, 2023
@veeso veeso closed this as completed in #68 Jan 6, 2024
@defanor
Copy link
Author

defanor commented Jan 6, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants