From 64349f1eae8dd64baeffb9274744fdd1551f957a Mon Sep 17 00:00:00 2001 From: Kahbazi Date: Fri, 11 Oct 2019 19:05:20 +0330 Subject: [PATCH] prevent timeout if debugger is attached (#14879) --- src/SignalR/server/Core/src/HubConnectionContext.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/SignalR/server/Core/src/HubConnectionContext.cs b/src/SignalR/server/Core/src/HubConnectionContext.cs index 90db2563a0..3ab9d211a3 100644 --- a/src/SignalR/server/Core/src/HubConnectionContext.cs +++ b/src/SignalR/server/Core/src/HubConnectionContext.cs @@ -554,6 +554,11 @@ namespace Microsoft.AspNetCore.SignalR private void CheckClientTimeout() { + if (Debugger.IsAttached) + { + return; + } + // If it's been too long since we've heard from the client, then close this if (DateTime.UtcNow.Ticks - Volatile.Read(ref _lastReceivedTimeStamp) > _clientTimeoutInterval) {