Skip to content

Commit b550728

Browse files
committed
Do not break public type for now
1 parent b4a8361 commit b550728

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

projects/client/RabbitMQ.Client/src/client/impl/ConcurrentConsumerDispatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void Quiesce()
2424

2525
public Task Shutdown(IModel model)
2626
{
27-
return _workService.StopWork(model);
27+
return _workService.StopWorkAsync(model);
2828
}
2929

3030
public bool IsShutdown

projects/client/RabbitMQ.Client/src/client/impl/ConsumerWorkService.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,20 @@ private WorkPool StartNewWorkPool(IModel model)
2121
return newWorkPool;
2222
}
2323

24-
public Task StopWork(IModel model)
24+
public void StopWork()
25+
{
26+
foreach (IModel model in _workPools.Keys)
27+
{
28+
StopWork(model);
29+
}
30+
}
31+
32+
public void StopWork(IModel model)
33+
{
34+
StopWorkAsync(model).GetAwaiter().GetResult();
35+
}
36+
37+
internal Task StopWorkAsync(IModel model)
2538
{
2639
if (_workPools.TryRemove(model, out WorkPool workPool))
2740
{

0 commit comments

Comments
 (0)