Skip to content

Conversation

lvl-coding
Copy link

When both active mode and passive mode are using data channels, the socket fd used to establish the connection in active mode is not released, which will cause the socket fd reused by the data channel in passive mode to be closed by mistake when the user logs out, resulting in data writing failure.

This pull request includes a small change to the pyftpdlib/handlers.py file. The change modifies the handle_connect method to set _fileno to None when the connection is established.

  • pyftpdlib/handlers.py: Modified the handle_connect method to set _fileno to None when the connection is established.

Signed-off-by: masterLv <909173273@qq.com>
@giampaolo
Copy link
Owner

I think it's better if you do this in the del_channel method.
Also can you please update HISTORY.rst describing what this fixes?

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