Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
abhang-atish committed Aug 15, 2020
2 parents dedb75c + d763451 commit 6c9dd03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Fleck/WebSocketServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ public WebSocketServer(string location, bool supportDualStack = true)
_scheme = uri.Scheme;
var socket = new Socket(_locationIP.AddressFamily, SocketType.Stream, ProtocolType.IP);

socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1);

if (SupportDualStack)
{
if (!FleckRuntime.IsRunningOnMono() && FleckRuntime.IsRunningOnWindows())
{
socket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, false);
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1);
}
}

Expand Down

0 comments on commit 6c9dd03

Please sign in to comment.