Skip to content

Commit 2f66aa9

Browse files
authored
Exception handling & memory leak fixes (#152)
1 parent c8ff204 commit 2f66aa9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nanoFramework.System.Net/Sockets/Socket.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class Socket : IDisposable
3434

3535
// socket type
3636
[Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)]
37-
private SocketType _socketType;
37+
private SocketType _socketType = SocketType.Unknown;
3838

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

347-
if(m_fBlocking)
347+
if (m_fBlocking)
348348
{
349349
// blocking connect
350350
_nonBlockingConnectInProgress = false;
@@ -355,7 +355,7 @@ public void Connect(EndPoint remoteEP)
355355
_nonBlockingConnectInProgress = true;
356356
_nonBlockingConnectRightEndPoint = endPointSnapshot;
357357
}
358-
358+
359359
NativeSocket.connect(this, endPointSnapshot, !m_fBlocking);
360360

361361
if (m_fBlocking)

0 commit comments

Comments
 (0)