Skip to content

Commit

Permalink
Merge pull request #544 from Particular/hotfix-5.1.2
Browse files Browse the repository at this point in the history
Hotfix 5.1.2
  • Loading branch information
bording authored May 9, 2019
2 parents a4fa1af + 7522bec commit 91c10d6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ public Task Dispatch(TransportOperations outgoingMessages, TransportTransaction
tasks.Add(PublishMessage(operation, channel));
}

channelProvider.ReturnPublishChannel(channel);

return tasks.Count == 1 ? tasks[0] : Task.WhenAll(tasks);
}
finally
catch
{
channelProvider.ReturnPublishChannel(channel);
channel.Dispose();
throw;
}
}

Expand Down

0 comments on commit 91c10d6

Please sign in to comment.