hemilabs / heminetwork

The hemi network core daemons.
MIT License
67 stars 42 forks source link

electrumx: fix open/closed/idle metrics for conn pool #243

Closed joshuasing closed 2 months ago

joshuasing commented 2 months ago

Summary Fix ElectrumX connection pool open/closed/idle metrics.

Previously, the open metric and closed_total metrics weren't handled properly when a connection is closed. They would only be changed if the connection was also removed from the connection pool, which is false in most cases.

Additionally, the connsIdle metric needs to be decremented when a connection in the pool is removed and closed.

Changes