Increase TCP timeout? #177
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#177
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From
tb
on the Gemini mailing list.Bombadillo: I really like the look and feel of the browser, and accessing a few sites (especially gemini.circumlunar.space) is very quick. But most other gopher and gemini sites (eg: bombadillo.colorfield.space) seem to be unreachable. I get a TCP time-out after 5 seconds. This is tough, since my "broadband" connection is pretty slow.
I respond to the poster directly and will update here with more details when I receive a response. Thank you @makeworld for forwarding the message!
If I remember correctly, gopher uses a timeout (likely of 5 seconds). Gemini, however, does not use a timeout at all (or at least not one I have set). This is due to the way the Golang TLS lib is set up. There is a way to add a timeout to a gemini request, I just need to set it up. I have felt liket he gemini timeout is too long though.... so had planned on shortening it (or making it match the gopher timeout). I'm definitely ok with a longer than 5 second timeout and will adjust both accordingly once more details arrive.
@makeworld have you had similar issues?
You're welcome! I have not had similar issues, but likely my home connection is just faster than tb's.
In go-gemini (Amfora's gemini client lib), I setup a timeout like this.
Although this is only a timeout for forming the TLS connection, it doesn't apply to reading the content.
I've set it to 15 seconds by default, although idk if that's good. Maybe this would be a good thing to add to the config file?
I heard back on the e-mail and it seems that gemini connected fine for him, but that gopher was not loading things due to a slow connection and a short timeout.
In the short-term I suggested he updated line 52 of gopher/gopher.go with a timeout value more suitable to his use case.
However, it brings up the idea of maybe adding a configuration option to allow users to set their timeouts. For that to be truly useful I should also have gemini opperate with a timeout using that value.
I'll incorporate the code you provided above in the short term and try to find time to work on a config option. I'll keep this issue open while doing so :)
Thanks for the info!
This is being addressed in #178
That PR:
timeout
Hopefully this gives users, in general, the ability to control this as they see fit.
I did just notice that I am not doing any check for a negative timeout. I should verify what happens with that before merging in (note to self).
This has been merged into
develop
as a user configurable option that affects gemini and gopher.@makeworld do I remember you saying that go had released a breaking tls change? I cant seem to find a reference to the comment anywhere, but I should get that updated if need be...