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

ftp: fix wrong poll on the secondary socket #978

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@alesax
Contributor

alesax commented Aug 23, 2016

When we're uploading using FTP and the server issues a tiny pause
between opening the connection to the client's secondary socket, the
client's initial poll() times out, which leads to second poll() which
does not wait for POLLIN on the secondary socket. So that poll() also
has to time out, creating a long (200ms) pause.

This patch adds the correct flag to the secondary socket, making the
second poll() correctly wait for the connection there too.

Signed-off-by: Ales Novak alnovak@suse.cz

ftp: fix wrong poll on the secondary socket
When we're uploading using FTP and the server issues a tiny pause
between opening the connection to the client's secondary socket, the
client's initial poll() times out, which leads to second poll() which
does not wait for POLLIN on the secondary socket. So that poll() also
has to time out, creating a long (200ms) pause.

This patch adds the correct flag to the secondary socket, making the
second poll() correctly wait for the connection there too.

Signed-off-by: Ales Novak <alnovak@suse.cz>

@bagder bagder closed this in 7ad50a6 Aug 23, 2016

@bagder

This comment has been minimized.

Show comment
Hide comment
@bagder

bagder Aug 23, 2016

Member

thanks!

Member

bagder commented Aug 23, 2016

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment