Skip to content

Commit

Permalink
improve error check
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Apr 28, 2021
1 parent afdbd57 commit 824b68e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/mod_prometheus_status/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "C"

import (
"bufio"
"errors"
"io"
"net"
"os"
Expand Down Expand Up @@ -113,7 +114,7 @@ func metricServer(c net.Conn) {
for {
line, err := buf.ReadString('\n')
if err != nil {
if err == io.EOF {
if errors.Is(err, io.EOF) {
return
}
logErrorf("Reading client error: %s", err.Error())
Expand Down

0 comments on commit 824b68e

Please sign in to comment.