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

Enable so_reuseaddr on server transport implementations #1940

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

gjcairo
Copy link
Collaborator

@gjcairo gjcairo commented Jun 18, 2024

Motivation

We are not setting the so_reuseaddr on the server channel, meaning it's possible we get binding failures when bootstrapping the server if the provided address is already in use.

Modifications

Set the so_reuseaddr option when bootstrapping the server in both the NIOPosix and NIOTS implementations.
This is already done in v1.

Result

No more binding failures for reused ports.

@gjcairo gjcairo added the v2 A change for v2 label Jun 18, 2024
@gjcairo gjcairo requested a review from glbrntt June 18, 2024 21:29
@gjcairo gjcairo enabled auto-merge (squash) June 18, 2024 21:34
@gjcairo gjcairo merged commit 9058509 into grpc:main Jun 19, 2024
17 checks passed
@gjcairo gjcairo deleted the socket-reuse-addr branch June 19, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 A change for v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants