Skip to content

Commit c9a362f

Browse files
committed
Stash (destination) urlgroup on a field
1 parent 571f218 commit c9a362f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Servers/HttpSys/src/DelegationRule.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace Microsoft.AspNetCore.Server.HttpSys
1313
public class DelegationRule : IDisposable
1414
{
1515
private readonly ILogger _logger;
16+
private readonly UrlGroup _urlGroup;
1617
private readonly UrlGroup _sourceQueueUrlGroup;
1718
private bool _disposed;
1819
/// <summary>
@@ -32,6 +33,7 @@ internal DelegationRule(UrlGroup sourceQueueUrlGroup, string queueName, string u
3233
QueueName = queueName;
3334
UrlPrefix = urlPrefix;
3435
Queue = new RequestQueue(queueName, UrlPrefix, _logger, receiver: true);
36+
_urlGroup = Queue.UrlGroup;
3537
}
3638

3739
/// <inheritdoc />
@@ -49,7 +51,7 @@ public void Dispose()
4951
_sourceQueueUrlGroup.UnSetDelegationProperty(Queue, throwOnError: false);
5052
}
5153
catch (ObjectDisposedException) { /* Server may have been shutdown */ }
52-
Queue.UrlGroup.Dispose();
54+
_urlGroup.Dispose();
5355
Queue.Dispose();
5456
}
5557
}

0 commit comments

Comments
 (0)