statianzo / Fleck

C# Websocket Implementation
MIT License
2.25k stars 583 forks source link

Always set ReuseAddress #294

Closed xPaw closed 4 years ago

xPaw commented 4 years ago

Fixes #292

AppVeyorBot commented 4 years ago

:white_check_mark: Build Fleck 0.0.52-ci completed (commit https://github.com/statianzo/Fleck/commit/802fa161ac by @xPaw)

AppVeyorBot commented 4 years ago

:white_check_mark: Build Fleck 0.0.52-ci completed (commit https://github.com/statianzo/Fleck/commit/802fa161ac by @xPaw)

statianzo commented 4 years ago

Seems good to me.

@darkl @AdrianBathurst any concerns with this?

darkl commented 4 years ago

Looks good to me, seems like I accidentally broke it. I think I didn't realize the ! in the original !RuntimeInformation.IsOSPlatform(OSPlatform.Windows).

I don't understand why was that check included at first place, as it seems to work fine on Windows nowadays.

Elad

darkl commented 4 years ago

Oh, it seems that this change breaks the SupportDualStack switch. @xPaw can you please move the SetSocketOption line back into SupportDualStack if?

xPaw commented 4 years ago

Why is reuse related to dual stack?

darkl commented 4 years ago

This is the original issue. I guess you are right and it is not related. This breaks some previous behavior (the reuse was applied on Windows only if the flagSupportDualStack was true), but I guess it is ok.