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

Correctly set up SO_LINGER for the HTTP connector #2176

Merged
merged 1 commit into from Oct 17, 2017

Conversation

Projects
None yet
3 participants
@arteam
Member

arteam commented Oct 17, 2017

Jetty's ServerConnector accepts soLingerTime in milliseconds, rather
than in seconds as Socket.setSoLinger does 1. Dropwizard on the other
hand after parsing the YML configuration and extracting the soLingerTime parameter
passes it to Jetty in seconds. As a result, the configuration gets really
confusing for users, because the configuration value is more than the actual
SO_LINGER timeout by 1000 times.

The fix is to pass the configuration value to Jetty's ServerConnector
in milliseconds.

Fixes #2175

Correctly set up SO_LINGER for the HTTP connector
Jetty's `ServerConnector` accepts `soLingerTime` in milliseconds, rather
than in seconds as `Socket.setSoLinger` does [1]. Dropwizard on the other
hand after parsing the YML configuration and extracting the `soLingerTime` parameter
passes it to Jetty in seconds. As a result, the configuration gets really
confusing for users, because the configuration value is more than the actual
SO_LINGER timeout by 1000 times.

The fix is to pass the configuration value to Jetty's `ServerConnector`
in milliseconds.

[1]: http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html

@arteam arteam added the bug label Oct 17, 2017

@arteam arteam added this to the 1.1.6 milestone Oct 17, 2017

@joschi joschi self-assigned this Oct 17, 2017

@joschi

joschi approved these changes Oct 17, 2017

LGTM. 👍

@joschi joschi modified the milestones: 1.1.6, 1.1.5 Oct 17, 2017

@coveralls

This comment has been minimized.

coveralls commented Oct 17, 2017

Coverage Status

Coverage remained the same at 85.092% when pulling 32f9256 on fix_so_linger into 350ff22 on release/1.1.x.

@joschi joschi merged commit 78afd66 into release/1.1.x Oct 17, 2017

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls First build on fix_so_linger at 85.092%
Details

@joschi joschi deleted the fix_so_linger branch Oct 17, 2017

joschi added a commit that referenced this pull request Oct 17, 2017

Correctly set up SO_LINGER for the HTTP connector (#2176)
Jetty's `ServerConnector` accepts `soLingerTime` in milliseconds, rather
than in seconds as `Socket.setSoLinger` does [1]. Dropwizard on the other
hand after parsing the YML configuration and extracting the `soLingerTime` parameter
passes it to Jetty in seconds. As a result, the configuration gets really
confusing for users, because the configuration value is more than the actual
SO_LINGER timeout by 1000 times.

The fix is to pass the configuration value to Jetty's `ServerConnector`
in milliseconds.

[1]: http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html

(cherry picked from commit 78afd66)

joschi added a commit that referenced this pull request Oct 17, 2017

Correctly set up SO_LINGER for the HTTP connector (#2176)
Jetty's `ServerConnector` accepts `soLingerTime` in milliseconds, rather
than in seconds as `Socket.setSoLinger` does [1]. Dropwizard on the other
hand after parsing the YML configuration and extracting the `soLingerTime` parameter
passes it to Jetty in seconds. As a result, the configuration gets really
confusing for users, because the configuration value is more than the actual
SO_LINGER timeout by 1000 times.

The fix is to pass the configuration value to Jetty's `ServerConnector`
in milliseconds.

[1]: http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html

(cherry picked from commit 78afd66)

joschi added a commit that referenced this pull request Oct 17, 2017

Add #2176 to release notes
[ci skip]

joschi added a commit that referenced this pull request Oct 17, 2017

Add #2176 to release notes
[ci skip]

joschi added a commit that referenced this pull request Oct 17, 2017

Add #2176 to release notes
[ci skip]

sankate pushed a commit to sankate/dropwizard that referenced this pull request Nov 21, 2017

Correctly set up SO_LINGER for the HTTP connector (dropwizard#2176)
Jetty's `ServerConnector` accepts `soLingerTime` in milliseconds, rather
than in seconds as `Socket.setSoLinger` does [1]. Dropwizard on the other
hand after parsing the YML configuration and extracting the `soLingerTime` parameter
passes it to Jetty in seconds. As a result, the configuration gets really
confusing for users, because the configuration value is more than the actual
SO_LINGER timeout by 1000 times.

The fix is to pass the configuration value to Jetty's `ServerConnector`
in milliseconds.

[1]: http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html

(cherry picked from commit 78afd66)

sankate pushed a commit to sankate/dropwizard that referenced this pull request Nov 21, 2017

aaanders added a commit to aaanders/dropwizard that referenced this pull request Sep 20, 2018

Correctly set up SO_LINGER for the HTTP connector (dropwizard#2176)
Jetty's `ServerConnector` accepts `soLingerTime` in milliseconds, rather
than in seconds as `Socket.setSoLinger` does [1]. Dropwizard on the other
hand after parsing the YML configuration and extracting the `soLingerTime` parameter
passes it to Jetty in seconds. As a result, the configuration gets really
confusing for users, because the configuration value is more than the actual
SO_LINGER timeout by 1000 times.

The fix is to pass the configuration value to Jetty's `ServerConnector`
in milliseconds.

[1]: http://www.eclipse.org/jetty/documentation/9.4.x/configuring-connectors.html

(cherry picked from commit 78afd66)

aaanders added a commit to aaanders/dropwizard that referenced this pull request Sep 20, 2018

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