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

bridge connection failure delayed by keepalive_interval #1028

Open
abiliojr opened this issue Nov 10, 2018 · 1 comment
Open

bridge connection failure delayed by keepalive_interval #1028

abiliojr opened this issue Nov 10, 2018 · 1 comment

Comments

@abiliojr
Copy link
Contributor

This bug happens using ADNS with a bridge.

Any bridge connection attempt that fails more than once seems to be delayed by keepalive_interval, and not only by restart_timeout.

Log sample, using restart_timeout = 3 and keepalive_interval = 5:

1541844877: Connecting bridge (step 1) amb (localhost:1884)
1541844877: Connecting bridge (step 2) amb (localhost:1884)
1541844877: Socket error on client local.abiliojr.amb, disconnecting.
1541844881: Connecting bridge (step 1) amb (localhost:1884)
1541844881: Connecting bridge (step 2) amb (localhost:1884)
1541844886: Socket error on client local.abiliojr.amb, disconnecting.

See that in the second attempt, 5 seconds pass until the socket error is detected.

This seems to be caused by a reuse of the context without proper cleaning, leaving context->events dirty. This makes the condition if(!(context->events & EPOLLOUT)) in file loop.c to be evaluated to false in the subsequent attempts, changing the behavior and triggering the extra delay.

@abiliojr
Copy link
Contributor Author

Solution in pull request 1029

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