When Node is launched with a debug listener, disable connection draining on restart. Fixes #506.

This commit is contained in:
SteveSandersonMS
2017-01-20 17:32:26 +00:00
parent 351fe3d15c
commit d7d1a04751
3 changed files with 31 additions and 4 deletions

View File

@@ -72,7 +72,8 @@ namespace Microsoft.AspNetCore.NodeServices
{
if (_currentNodeInstance == nodeInstance)
{
DisposeNodeInstance(_currentNodeInstance, delay: ConnectionDrainingTimespan);
var disposalDelay = ex.AllowConnectionDraining ? ConnectionDrainingTimespan : TimeSpan.Zero;
DisposeNodeInstance(_currentNodeInstance, disposalDelay);
_currentNodeInstance = null;
}
}