Skip to content

Commit 6acac81

Browse files
authored
Avoid _settingsIndex overflow (#35394)
1 parent 62be6d1 commit 6acac81

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Servers/Kestrel/Transport.Sockets/src/SocketConnectionContextFactory.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ public sealed class SocketConnectionContextFactory : IDisposable
2020
private readonly ISocketsTrace _trace;
2121
private readonly int _settingsCount;
2222
private readonly QueueSettings[] _settings;
23-
private int _settingsIndex;
23+
24+
// long to prevent overflow
25+
private long _settingsIndex;
2426

2527
/// <summary>
2628
/// Creates the <see cref="SocketConnectionContextFactory"/>.

0 commit comments

Comments
 (0)