[Modify] Polish it

This commit is contained in:
sta 2020-11-19 20:06:13 +09:00
parent e8e0bdbdf9
commit fb544cad41

View File

@ -270,6 +270,7 @@ namespace WebSocketSharp.Net
private static void onRead (IAsyncResult asyncResult)
{
var conn = (HttpConnection) asyncResult.AsyncState;
var current = conn._reuses;
if (conn._socket == null)
return;
@ -278,16 +279,14 @@ namespace WebSocketSharp.Net
if (conn._socket == null)
return;
var nread = 0;
try {
var current = conn._reuses;
if (!conn._timeoutCanceled[current]) {
conn._timer.Change (Timeout.Infinite, Timeout.Infinite);
conn._timeoutCanceled[current] = true;
}
var nread = 0;
try {
nread = conn._stream.EndRead (asyncResult);
}
catch (Exception) {