Only scheduleWrites on the threadpool
This commit is contained in:
parent
480996433e
commit
e6bc0bc335
|
|
@ -289,16 +289,9 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
_connection.Abort();
|
_connection.Abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool scheduleWrite = false;
|
|
||||||
|
|
||||||
lock (_contextLock)
|
lock (_contextLock)
|
||||||
{
|
{
|
||||||
PoolWriteContext(writeContext);
|
PoolWriteContext(writeContext);
|
||||||
if (_nextWriteContext != null)
|
|
||||||
{
|
|
||||||
scheduleWrite = true;
|
|
||||||
_writePending = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// _numBytesPreCompleted can temporarily go negative in the event there are
|
// _numBytesPreCompleted can temporarily go negative in the event there are
|
||||||
// completed writes that we haven't triggered callbacks for yet.
|
// completed writes that we haven't triggered callbacks for yet.
|
||||||
|
|
@ -334,12 +327,6 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
}
|
}
|
||||||
|
|
||||||
_log.ConnectionWriteCallback(_connectionId, status);
|
_log.ConnectionWriteCallback(_connectionId, status);
|
||||||
|
|
||||||
if (scheduleWrite)
|
|
||||||
{
|
|
||||||
ScheduleWrite();
|
|
||||||
}
|
|
||||||
|
|
||||||
_tasksCompleted.Clear();
|
_tasksCompleted.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue