Skip to content

Fix crash on OpenBSD due to unsupported TCP KeepAlivePeriod #1456

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

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

BlackNovaTech
Copy link
Contributor

On OpenBSD, when the server would accept it's first connection, it would immediately crash with the message set tcp 127.0.0.1:8082->127.0.0.1:24032: protocol not available.

This is caused by OpenBSD not supporting changing the TCP_USER_TIMEOUT. Instead they only support setting the TCP KeepAlive Intervals through sysctl. (See issues aerogo/aero#10 and deprecrated/net2-rs#82)

This patch reverts one of the error handling cases from #1271, and explicitly ignores so to just use the global default KeepAliveInterval if changing it fails.

@th3-z
Copy link

th3-z commented Dec 26, 2019

Thanks, this issue was preventing me from working and your commit fixed it.

@emersion
Copy link

Any progress on this PR? Anything we can do to help it get merged? Thanks!

@ghost
Copy link

ghost commented Feb 2, 2020

Any reason this is not merged? cc: @vishr

@codecov
Copy link

codecov bot commented Feb 2, 2020

Codecov Report

Merging #1456 into master will increase coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1456      +/-   ##
==========================================
+ Coverage   84.38%   84.42%   +0.04%     
==========================================
  Files          27       27              
  Lines        2094     2093       -1     
==========================================
  Hits         1767     1767              
+ Misses        213      212       -1     
  Partials      114      114
Impacted Files Coverage Δ
echo.go 85.75% <0%> (+0.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75620e6...fa87a5e. Read the comment docs.

@BlackNovaTech
Copy link
Contributor Author

I've rebased the patch onto the last version of master to let all the CI tests run, since they have been fixed since I created this PR.
Hopefully this helps getting this merged.

@vishr vishr merged commit 504f39a into labstack:master Feb 3, 2020
@BlackNovaTech BlackNovaTech deleted the openbsd-keepalive branch March 3, 2020 21:57
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.

4 participants