From 3064728c0517388dccb4694259793a7b93baa1e2 Mon Sep 17 00:00:00 2001 From: Huei Feng <34702552+hueifeng@users.noreply.github.com> Date: Fri, 29 May 2020 05:18:14 +0800 Subject: [PATCH] Update Http3Connection lock objects to be readonly (#22263) --- .../Kestrel/Core/src/Internal/Http3/Http3Connection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Connection.cs b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Connection.cs index 92fb441dda..b0c85bfcdf 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Connection.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http3/Http3Connection.cs @@ -31,13 +31,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http3 private long _highestOpenedStreamId; // TODO lock to access private volatile bool _haveSentGoAway; - private object _sync = new object(); + private readonly object _sync = new object(); private MultiplexedConnectionContext _multiplexedContext; private readonly Http3ConnectionContext _context; private readonly ISystemClock _systemClock; private readonly TimeoutControl _timeoutControl; private bool _aborted; - private object _protocolSelectionLock = new object(); + private readonly object _protocolSelectionLock = new object(); public Http3Connection(Http3ConnectionContext context) {