Skip to content

Commit

Permalink
fix for incompatible address on restart (#186)
Browse files Browse the repository at this point in the history
Previously when a listener would restart because of an error while on
an IPv6 address it would give an error ‘An address incompatible with
the requested protocol was used’. This fixes the issue.
  • Loading branch information
jespertheend authored and statianzo committed Sep 17, 2016
1 parent 27e3feb commit 598e595
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fleck/WebSocketServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void ListenForClients()
try
{
ListenerSocket.Dispose();
var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP);
var socket = new Socket(_locationIP.AddressFamily, SocketType.Stream, ProtocolType.IP);
ListenerSocket = new SocketWrapper(socket);
Start(_config);
FleckLog.Info("Listener socket restarted");
Expand Down

0 comments on commit 598e595

Please sign in to comment.