Skip to content

Commit

Permalink
Merge pull request #624 from schlawg/no-negative-size
Browse files Browse the repository at this point in the history
prevent devious scheduling from reporting negative size to kamon
  • Loading branch information
ornicar authored Nov 28, 2024
2 parents ff0c941 + 8a1f104 commit 9dc34d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/netty/ActorChannelConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ object ActorChannelConnector:
private val size = java.util.concurrent.atomic.AtomicInteger()

def add(channel: Channel): Unit =
queue.add(channel)
size.getAndIncrement()
queue.add(channel)

def poll(): Option[Channel] =
val maybeChannel = Option(queue.poll())
Expand Down

0 comments on commit 9dc34d5

Please sign in to comment.