Skip to content

Commit 9c2152c

Browse files
Can use slighly less coarse-grained locking here
evt is a local variable and thus cannot possibly be shared
1 parent 12b3982 commit 9c2152c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

projects/client/RabbitMQ.Client/src/client/messagepatterns/Subscription.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,12 @@ public void Nack(BasicDeliverEventArgs evt,
235235
bool multiple,
236236
bool requeue)
237237
{
238+
if (evt == null) {
239+
return;
240+
}
241+
238242
lock(m_eventLock)
239243
{
240-
if (evt == null) {
241-
return;
242-
}
243-
244244
if (!m_noAck) {
245245
m_model.BasicNack(evt.DeliveryTag, multiple, requeue);
246246
}

0 commit comments

Comments
 (0)