narrow lock scope when connections end
This commit is contained in:
parent
fed7c44829
commit
132263e767
|
|
@ -327,8 +327,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
}
|
||||
|
||||
void IConnectionControl.End(ProduceEndType endType)
|
||||
{
|
||||
lock (_stateLock)
|
||||
{
|
||||
switch (endType)
|
||||
{
|
||||
|
|
@ -342,6 +340,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Http
|
|||
break;
|
||||
case ProduceEndType.SocketShutdown:
|
||||
case ProduceEndType.SocketDisconnect:
|
||||
lock (_stateLock)
|
||||
{
|
||||
if (_connectionState == ConnectionState.Disconnecting ||
|
||||
_connectionState == ConnectionState.SocketClosed)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue