Skip to content

Commit

Permalink
Merge pull request #1089 from fales1488/patch-1
Browse files Browse the repository at this point in the history
Fix Division by Zero in FairQueueing when m_active is 0
  • Loading branch information
drewnoakes authored May 8, 2024
2 parents 97da3b4 + 2ce70f0 commit 173358c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NetMQ/Core/Patterns/Utils/FairQueueing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public bool RecvPipe(ref Msg msg, [NotNullWhen(returnValue: true)] out Pipe? pip

m_more = msg.HasMore;
if (!m_more)
m_current = (m_current + 1) % m_active;
m_current = m_active > 0 ? (m_current + 1) % m_active : 0;
return true;
}

Expand Down

0 comments on commit 173358c

Please sign in to comment.