From dd6d1837ea9c3bc86bf23a7fa8efcfdfcfc9d84c Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Fri, 21 Jun 2024 14:40:14 -0400 Subject: [PATCH] Work-around for #2336 --- csharp/src/Ice/ConnectionI.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/csharp/src/Ice/ConnectionI.cs b/csharp/src/Ice/ConnectionI.cs index b9d4adacf85..ecb94a502be 100644 --- a/csharp/src/Ice/ConnectionI.cs +++ b/csharp/src/Ice/ConnectionI.cs @@ -2119,10 +2119,15 @@ _inactivityTimer is null && // timer not already scheduled // inactivity timer if all outgoing messages in _sendStreams are heartbeats. foreach (OutgoingMessage queuedMessage in _sendStreams) { - if (queuedMessage.stream.getBuffer().b.get(8) != Protocol.validateConnectionMsg) + // TODO: temporary work-around for #2336 + Ice.Internal.Buffer buffer = queuedMessage.stream.getBuffer(); + if (!buffer.empty()) // should never happen { - isInactive = false; - break; // for + if (buffer.b.get(8) != Protocol.validateConnectionMsg) + { + isInactive = false; + break; // for + } } }