Commit af0b2223 authored by Marc Gravell's avatar Marc Gravell

Fix a #if range on EndConnect

parent 33554edc
...@@ -298,7 +298,7 @@ private void EndConnectImpl(IAsyncResult ar, ConnectionMultiplexer multiplexer, ...@@ -298,7 +298,7 @@ private void EndConnectImpl(IAsyncResult ar, ConnectionMultiplexer multiplexer,
multiplexer.Wait((Task)ar); // make it explode if invalid (note: already complete at this point) multiplexer.Wait((Task)ar); // make it explode if invalid (note: already complete at this point)
#else #else
socket.EndConnect(ar); socket.EndConnect(ar);
#endif
var netStream = new NetworkStream(socket, false); var netStream = new NetworkStream(socket, false);
var socketMode = callback == null ? SocketMode.Abort : callback.Connected(netStream, log); var socketMode = callback == null ? SocketMode.Abort : callback.Connected(netStream, log);
switch (socketMode) switch (socketMode)
...@@ -322,7 +322,6 @@ private void EndConnectImpl(IAsyncResult ar, ConnectionMultiplexer multiplexer, ...@@ -322,7 +322,6 @@ private void EndConnectImpl(IAsyncResult ar, ConnectionMultiplexer multiplexer,
Shutdown(socket); Shutdown(socket);
break; break;
} }
#endif
} }
catch (ObjectDisposedException) catch (ObjectDisposedException)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment