Skip to content

Commit f516fcd

Browse files
committed
up
1 parent fb56c85 commit f516fcd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

KBEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ public void _closeNetwork(NetworkInterface networkInterface)
313313
*/
314314
public void sendTick()
315315
{
316-
if(_networkInterface == null || !_networkInterface.valid())
316+
if(_networkInterface == null || _networkInterface.connected == false)
317317
return;
318318

319319
if(!loginappMessageImported_ && !baseappMessageImported_)

NetworkInterface.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ public void close()
7676
{
7777
if(_socket != null)
7878
{
79-
Dbg.ERROR_MSG(string.Format("Ne"));
8079
_socket.Close(0);
8180
_socket = null;
8281
Event.fireAll("onDisconnected", new object[]{});
@@ -93,7 +92,7 @@ public virtual PacketReceiver packetReceiver()
9392

9493
public virtual bool valid()
9594
{
96-
return ((_socket != null) && (connected == true));
95+
return ((_socket != null) && (_socket.Connected == true));
9796
}
9897

9998
public void _onConnectionState(ConnectState state)
@@ -111,7 +110,7 @@ public void _onConnectionState(ConnectState state)
111110
else
112111
{
113112
reset();
114-
Dbg.ERROR_MSG(string.Format("NetworkInterface::_onConnectionState(), connect is error! ip: {0}:{1}, err: {2}", state.connectIP, state.connectPort, state.error));
113+
Dbg.ERROR_MSG(string.Format("NetworkInterface::_onConnectionState(), connect error! ip: {0}:{1}, err: {2}", state.connectIP, state.connectPort, state.error));
115114
}
116115

117116
Event.fireAll("onConnectionState", new object[] { success });

0 commit comments

Comments
 (0)