Skip to content

Commit

Permalink
Fix semver comparison code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevan committed May 17, 2023
1 parent 272e47e commit 1a116ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector/pgpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func pgpoolScanTime(val string) (out int64) {
*/

func (c *collector) getPPHCStats(semversion string) {
if semver.Compare(semversion, "v4.1") <= 0 { // is version <= v4.1
if semver.Compare(semversion, "v4.2") < 0 { // is version < 4.2
return // no health check stats
}

Expand Down Expand Up @@ -217,7 +217,7 @@ func (c *collector) getPPHCStats(semversion string) {
*/

func (c *collector) getPPBEStats(semversion string) {
if semver.Compare(semversion, "v4.1") <= 0 { // is version <= v4.1
if semver.Compare(semversion, "v4.2") < 0 { // is version < v4.2
return // no backend stats
}

Expand Down

0 comments on commit 1a116ea

Please sign in to comment.