Skip to content

Commit afee321

Browse files
committed
up
1 parent e10de65 commit afee321

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

NetworkInterface.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void _onConnectStatus(string error)
7272
{
7373
KBEngine.Event.deregisterIn(this);
7474

75-
bool success = (error == "");
75+
bool success = (error == "" && valid());
7676

7777
if(success)
7878
{
@@ -99,7 +99,8 @@ private static void connectCB(IAsyncResult ar)
9999
NetworkInterface networkInterface = (NetworkInterface) ar.AsyncState;
100100

101101
// Complete the connection.
102-
networkInterface.sock().EndConnect(ar);
102+
if(networkInterface.sock() != null)
103+
networkInterface.sock().EndConnect(ar);
103104

104105
Event.fireIn("_onConnectStatus", new object[]{""});
105106
}

0 commit comments

Comments
 (0)