Merge branch 'release/1.3.2'
This commit is contained in:
commit
53dc0b79f1
@ -34,6 +34,7 @@ namespace Tapeti.Connection
|
|||||||
|
|
||||||
// These fields are for use in the taskQueue only!
|
// These fields are for use in the taskQueue only!
|
||||||
private RabbitMQ.Client.IConnection connection;
|
private RabbitMQ.Client.IConnection connection;
|
||||||
|
private bool isClosing;
|
||||||
private bool isReconnect;
|
private bool isReconnect;
|
||||||
private IModel channelInstance;
|
private IModel channelInstance;
|
||||||
private ulong lastDeliveryTag;
|
private ulong lastDeliveryTag;
|
||||||
@ -173,6 +174,8 @@ namespace Tapeti.Connection
|
|||||||
|
|
||||||
return taskQueue.Value.Add(() =>
|
return taskQueue.Value.Add(() =>
|
||||||
{
|
{
|
||||||
|
isClosing = true;
|
||||||
|
|
||||||
if (channelInstance != null)
|
if (channelInstance != null)
|
||||||
{
|
{
|
||||||
channelInstance.Dispose();
|
channelInstance.Dispose();
|
||||||
@ -371,6 +374,9 @@ namespace Tapeti.Connection
|
|||||||
});
|
});
|
||||||
|
|
||||||
channelInstance = null;
|
channelInstance = null;
|
||||||
|
|
||||||
|
if (!isClosing)
|
||||||
|
taskQueue.Value.Add(() => WithRetryableChannel(channel => { }));
|
||||||
};
|
};
|
||||||
|
|
||||||
channelInstance.BasicReturn += HandleBasicReturn;
|
channelInstance.BasicReturn += HandleBasicReturn;
|
||||||
|
Loading…
Reference in New Issue
Block a user