Skip to content

Commit 4cf638f

Browse files
authored
Merge pull request #34 from jay602/1.x
客户端sdk网络模块出错 #1216
2 parents cbd03d1 + af2ebdb commit 4cf638f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Assets/Plugins/kbengine_unity3d_plugins/PacketReceiver.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,15 @@ private void _asyncReceive()
184184

185185
private void _onRecv(IAsyncResult ar)
186186
{
187-
AsyncReceiveMethod caller = (AsyncReceiveMethod)ar.AsyncState;
188-
caller.EndInvoke(ar);
187+
try
188+
{
189+
AsyncReceiveMethod caller = (AsyncReceiveMethod)ar.AsyncState;
190+
caller.EndInvoke(ar);
191+
}
192+
catch(ObjectDisposedException)
193+
{
194+
195+
}
189196
}
190197
}
191198
}

0 commit comments

Comments
 (0)