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

Handshake timeout too short on slow/high-latency connections #438

Closed
nwhitehorn opened this issue Jun 14, 2021 · 0 comments
Closed

Handshake timeout too short on slow/high-latency connections #438

nwhitehorn opened this issue Jun 14, 2021 · 0 comments

Comments

@nwhitehorn
Copy link

nwhitehorn commented Jun 14, 2021

On very high-latency connections, the 10-second timeout for handshaking is too short and the connection attempt will fail (this was observed over a satellite connection with 3-4 second round-trip times and an available bandwidth of ~ 2400 baud). As a stopgap, I have applied the following patch, but it might be better if this were configurable or a more intelligent approach is used to pick the timeout (don't know what that would be though).

diff --git a/mm-go-irckit/server.go b/mm-go-irckit/server.go
index 9cc26f3..4e7ee44 100644
--- a/mm-go-irckit/server.go
+++ b/mm-go-irckit/server.go
@@ -478,7 +478,7 @@ outerloop:
                        }
 
                        return err
-               case <-time.After(10 * time.Second):
+               case <-time.After(90 * time.Second):
                        return ErrHandshakeFailed
                }
        }
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