Skip to content
6 changes: 3 additions & 3 deletions nanoFramework.System.Net/Sockets/Socket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Socket : IDisposable

// socket type
[Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)]
private SocketType _socketType;
private SocketType _socketType = SocketType.Unknown;

// Our internal state doesn't automatically get updated after a non-blocking connect
// completes. Keep track of whether we're doing a non-blocking connect, and make sure
Expand Down Expand Up @@ -344,7 +344,7 @@ public void Connect(EndPoint remoteEP)
EndPoint endPointSnapshot = remoteEP;
Snapshot(ref endPointSnapshot);

if(m_fBlocking)
if (m_fBlocking)
{
// blocking connect
_nonBlockingConnectInProgress = false;
Expand All @@ -355,7 +355,7 @@ public void Connect(EndPoint remoteEP)
_nonBlockingConnectInProgress = true;
_nonBlockingConnectRightEndPoint = endPointSnapshot;
}

NativeSocket.connect(this, endPointSnapshot, !m_fBlocking);

if (m_fBlocking)
Expand Down