Merge branch 'mintaka' into general-devel
This commit is contained in:
commit
bcd00c0243
1 changed files with 14 additions and 1 deletions
|
|
@ -73,7 +73,20 @@ namespace TShockAPI.Sockets
|
||||||
private void ReadCallback(IAsyncResult result)
|
private void ReadCallback(IAsyncResult result)
|
||||||
{
|
{
|
||||||
Tuple<SocketReceiveCallback, object> tuple = (Tuple<SocketReceiveCallback, object>)result.AsyncState;
|
Tuple<SocketReceiveCallback, object> tuple = (Tuple<SocketReceiveCallback, object>)result.AsyncState;
|
||||||
tuple.Item1(tuple.Item2, this._connection.GetStream().EndRead(result));
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
tuple.Item1(tuple.Item2, this._connection.GetStream().EndRead(result));
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException)
|
||||||
|
{
|
||||||
|
// This is common behaviour during client disconnects
|
||||||
|
((ISocket)this).Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
TShock.Log.Error(ex.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SendCallback(IAsyncResult result)
|
private void SendCallback(IAsyncResult result)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue