When monitoring schema registry through JMX, I get decreasing "connections-active" counter.

I found by debugging that the closed() method of MetricsListener is called two times for every connections, which explains the decrease, but I could not spot the source of the problem.