当我将一些修改过的二进制文件复制到服务器的bin目录时,客户端报告NullReferenceException
错误,然后报告两个线程连接到服务器。
服务器将每个连接报告为成功。
服务器:IIS10 / asp.net4.5,
客户端:.net core 2.2.1 / MS.AspNet.SignalR2.4
客户代码:
public class SrClient : IDisposable
{
ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
public SrClient()
{
var ServerURI = AppSettingHelper.WebSite;
DataParse.SrConnection = new HubConnection(ServerURI, "t=" + AppSettingHelper.T);
DataParse.SrConnection.Closed += OnDisconnected;
DataParse.SrConnection.Error += (err) => { log.Error("SR Err.", err); };
DataParse.SrConnection.Reconnecting += () => { log.Info("SR Event Reconnecting..."); };
DataParse.SrConnection.Reconnected += () => { log.Info("SR Event Reconnected."); };
DataParse.SrConnection.StateChanged += (state) =>
{
log.InfoFormat("SR State:{0}=>{1}", state.OldState, state.NewState);
if (state.NewState == ConnectionState.Connected)
{
...
}
};
DataParse.SrConnection.TraceLevel = TraceLevels.All;
DataParse.SrConnection.TraceWriter = System.IO.File.CreateText("d:\\sr.txt");// Console.Out;
DataParse.HubProxy = DataParse.SrConnection.CreateHubProxy("PropertyHub");
StartAsync().Wait();
}
private void OnDisconnected()
{
log.Info("SR Connection Closed!");
if (_disposed || DataParse.SrConnection.State == ConnectionState.Connected) return;
var t = StartAsync();
bool result = false;
t.ContinueWith(task =>
{
if (!task.IsFaulted)
{
result = true;
}
else if (task.Exception != null)
{
log.Error(task.Exception);
}
}).Wait();
if (!result)
{
Task.Delay(5000).Wait();
log.Info("SR Connection Restart!");
OnDisconnected();
}
}
public async Task StartAsync()
{
log.Debug("SR Connect Starting...");
DataParse.RefreshAuth();
await DataParse.SrConnection.Start();
}
}
日志信息:
2019-02-02 13:34:03,098 [33] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR State:Connected=>Reconnecting
2019-02-02 13:34:03,114 [33] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Event Reconnecting...
2019-02-02 13:34:03,115 [26] ERROR Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Err.
System.InvalidOperationException: The WebSocket has already been started.
at System.Net.WebSockets.ClientWebSocketOptions.ThrowIfReadOnly()
at Microsoft.AspNet.SignalR.Client.Transports.WebSocketWrapperRequest.SetRequestHeaders(IDictionary`2 headers)
at Microsoft.AspNet.SignalR.Client.Transports.WebSocketTransport.PerformConnect(String url)
at Microsoft.AspNet.SignalR.Client.Transports.WebSocketTransport.DoReconnect()
2019-02-02 13:34:03,120 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR State:Reconnecting=>Connected
2019-02-02 13:34:03,121 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Event Reconnected.
2019-02-02 13:34:03,122 [28] ERROR Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Err.
System.InvalidOperationException: There is already one outstanding 'ReceiveAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.
at System.Net.WebSockets.ManagedWebSocket.ThrowOperationInProgress(String methodName)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state)
2019-02-02 13:34:03,123 [26] ERROR Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Err.
System.OperationCanceledException: Aborted ---> System.IO.IOException: Unable to read data from the transport connection: 由于线程退出或应用程序请求,已中止 I/O 操作。. ---> System.Net.Sockets.SocketException: 由于线程退出或应用程序请求,已中止 I/O 操作。
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStreamInternal.<FillBufferAsync>g__InternalFillBufferAsync|38_0[TReadAdapter](TReadAdapter adap, ValueTask`1 task, Int32 min, Int32 initial)
at System.Net.Security.SslStreamInternal.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer)
at System.Net.Http.HttpConnection.ReadBufferedAsyncCore(Memory`1 destination)
at System.Net.Http.HttpConnection.RawConnectionStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, Boolean throwOnPrematureClosure)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
--- End of inner exception stack trace ---
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state)
2019-02-02 13:34:03,123 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR State:Connected=>Reconnecting
2019-02-02 13:34:03,125 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Event Reconnecting...
2019-02-02 13:34:03,131 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR State:Reconnecting=>Connected
2019-02-02 13:34:03,131 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Event Reconnected.
2019-02-02 13:34:03,132 [28] ERROR Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Err.
System.InvalidOperationException: There is already one outstanding 'ReceiveAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.
at System.Net.WebSockets.ManagedWebSocket.ThrowOperationInProgress(String methodName)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state)
2019-02-02 13:34:03,133 [26] ERROR Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Err.
System.OperationCanceledException: Aborted ---> System.IO.IOException: Unable to read data from the transport connection: 由于线程退出或应用程序请求,已中止 I/O 操作。. ---> System.Net.Sockets.SocketException: 由于线程退出或应用程序请求,已中止 I/O 操作。
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStreamInternal.<FillBufferAsync>g__InternalFillBufferAsync|38_0[TReadAdapter](TReadAdapter adap, ValueTask`1 task, Int32 min, Int32 initial)
at System.Net.Security.SslStreamInternal.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer)
at System.Net.Http.HttpConnection.ReadBufferedAsyncCore(Memory`1 destination)
at System.Net.Http.HttpConnection.RawConnectionStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, Boolean throwOnPrematureClosure)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
--- End of inner exception stack trace ---
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state)
2019-02-02 13:34:03,133 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR State:Connected=>Reconnecting
2019-02-02 13:34:03,135 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Event Reconnecting...
2019-02-02 13:34:03,141 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR State:Reconnecting=>Connected
2019-02-02 13:34:03,144 [28] INFO Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Event Reconnected.
2019-02-02 13:34:03,145 [28] ERROR Hinfo.HjProperty.PubDoorConsole.Helper.SrClient [?] - SR Err.
System.InvalidOperationException: There is already one outstanding 'ReceiveAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.
at System.Net.WebSockets.ManagedWebSocket.ThrowOperationInProgress(String methodName)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microso...
调试信息
05:28:25.8125895 - null - ChangeState(Disconnected, Connecting)
05:28:25.9633946 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a/signalr/connect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100
05:28:25.9951810 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnMessage({"C":"d-6A0E690-B,0|e,0|f,1","S":1,"M":[]})
05:28:26.0159894 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connecting, Connected)
05:28:32.8639755 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnMessage({})
...
05:33:03.3425678 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnMessage({})
05:33:09.5759175 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:09.5788697 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:09.5868658 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:15.6904022 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:25.6282574 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnMessage({})
05:33:35.6549749 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnMessage({})
05:33:45.4501980 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:45.4502340 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:45.4550195 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:45.4577447 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.IO.IOException: Unable to read data from the transport connection: 远程主机强迫关闭了一个现有的连接。. ---> System.Net.Sockets.SocketException: 远程主机强迫关闭了一个现有的连接。
--- End of inner exception stack trace ---
at System.Net.Security.SslStreamInternal.<WriteSingleChunk>g__CompleteAsync|36_1[TWriteAdapter](ValueTask writeTask, Byte[] bufferToReturn)
at System.Net.Security.SslStreamInternal.<WriteAsyncInternal>g__ExitWriteAsync|35_0[TWriteAdapter](ValueTask task)
at System.Net.WebSockets.ManagedWebSocket.SendCloseFrameAsync(WebSocketCloseStatus closeStatus, String closeStatusDescription, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.CloseAsyncPrivate(WebSocketCloseStatus closeStatus, String statusDescription, CancellationToken cancellationToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state)
at Microsoft.AspNet.SignalR.Client.Transports.WebSocketTransport.PerformConnect(String url)
at Microsoft.AspNet.SignalR.Client.Transports.WebSocketTransport.DoReconnect())
05:33:45.4662615 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:47.4668519 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:47.4711060 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.4778652 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:47.5080218 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.5080541 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:47.5140626 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.5164781 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.5165567 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.5206026 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:47.5243873 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.NullReferenceException: Object reference not set to an instance of an object.
at System.Net.WebSockets.ClientWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state))
05:33:47.5345298 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.5345594 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:47.5416202 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.5426161 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.5426840 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.5480535 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:47.5544233 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.InvalidOperationException: There is already one outstanding 'ReceiveAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.
at System.Net.WebSockets.ManagedWebSocket.ThrowOperationInProgress(String methodName)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state))
05:33:47.5547871 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.OperationCanceledException: Aborted ---> System.IO.IOException: Unable to read data from the transport connection: 由于线程退出或应用程序请求,已中止 I/O 操作。. ---> System.Net.Sockets.SocketException: 由于线程退出或应用程序请求,已中止 I/O 操作。
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStreamInternal.<FillBufferAsync>g__InternalFillBufferAsync|38_0[TReadAdapter](TReadAdapter adap, ValueTask`1 task, Int32 min, Int32 initial)
at System.Net.Security.SslStreamInternal.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer)
at System.Net.Http.HttpConnection.ReadBufferedAsyncCore(Memory`1 destination)
at System.Net.Http.HttpConnection.RawConnectionStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, Boolean throwOnPrematureClosure)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
--- End of inner exception stack trace ---
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state))
05:33:47.5574124 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.5574469 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:47.5713153 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.5723876 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.5737094 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.5786220 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:47.5830845 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.InvalidOperationException: There is already one outstanding 'ReceiveAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.
at System.Net.WebSockets.ManagedWebSocket.ThrowOperationInProgress(String methodName)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state))
05:33:47.5839900 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.OperationCanceledException: Aborted ---> System.IO.IOException: Unable to read data from the transport connection: 由于线程退出或应用程序请求,已中止 I/O 操作。. ---> System.Net.Sockets.SocketException: 由于线程退出或应用程序请求,已中止 I/O 操作。
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStreamInternal.<FillBufferAsync>g__InternalFillBufferAsync|38_0[TReadAdapter](TReadAdapter adap, ValueTask`1 task, Int32 min, Int32 initial)
at System.Net.Security.SslStreamInternal.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer)
at System.Net.Http.HttpConnection.ReadBufferedAsyncCore(Memory`1 destination)
at System.Net.Http.HttpConnection.RawConnectionStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, Boolean throwOnPrematureClosure)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
--- End of inner exception stack trace ---
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state))
05:33:47.5910714 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.5910971 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:47.6001580 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.6013310 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.6027695 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.6071830 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:47.6158820 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.InvalidOperationException: There is already one outstanding 'ReceiveAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.
at System.Net.WebSockets.ManagedWebSocket.ThrowOperationInProgress(String methodName)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsync(ArraySegment`1 buffer, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state))
05:33:47.6161027 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.OperationCanceledException: Aborted ---> System.IO.IOException: Unable to read data from the transport connection: 由于线程退出或应用程序请求,已中止 I/O 操作。. ---> System.Net.Sockets.SocketException: 由于线程退出或应用程序请求,已中止 I/O 操作。
--- End of inner exception stack trace ---
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.GetResult(Int16 token)
at System.Net.Security.SslStreamInternal.<FillBufferAsync>g__InternalFillBufferAsync|38_0[TReadAdapter](TReadAdapter adap, ValueTask`1 task, Int32 min, Int32 initial)
at System.Net.Security.SslStreamInternal.ReadAsyncInternal[TReadAdapter](TReadAdapter adapter, Memory`1 buffer)
at System.Net.Http.HttpConnection.ReadBufferedAsyncCore(Memory`1 destination)
at System.Net.Http.HttpConnection.RawConnectionStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, Boolean throwOnPrematureClosure)
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
--- End of inner exception stack trace ---
at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketMessageReader.ReadMessageAsync(WebSocket webSocket, Int32 bufferSize, Nullable`1 maxMessageSize, CancellationToken disconnectToken)
at Microsoft.AspNet.SignalR.WebSockets.WebSocketHandler.ProcessWebSocketRequestAsync(WebSocket webSocket, CancellationToken disconnectToken, Func`2 messageRetriever, Object state))
05:33:47.6206703 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.6206947 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Connected, Reconnecting)
05:33:47.6283149 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS: OnClose()
05:33:47.6294122 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.6298709 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - WS Connecting to: wss://a.com/signalr/reconnect?clientProtocol=2.0&transport=webSockets&connectionData=[{"Name":"PropertyHub"}]&connectionToken=tk&t=100&messageId=d-6A0E690-B%2C0|e%2C0|f%2C1
05:33:47.6355298 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - ChangeState(Reconnecting, Connected)
05:33:47.6396647 - f10bf600-7bbb-4e43-8ce7-b19b779f8e27 - OnError(System.InvalidOperationException: There is already one outstanding 'ReceiveAsync' call for this WebSocket instance. ReceiveAsync and SendAsync can be called simultaneously, but at most one outstanding operation for each of them is allowed at the same time.