Skip to content

Commit

Permalink
Fix unhandled error warnings in x.go (#4366)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Dec 5, 2019
1 parent f378588 commit 747c847
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions x/x.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ func ReadLine(r *bufio.Reader, buf *bytes.Buffer) error {
// over to our own buffer.
line, isPrefix, err = r.ReadLine()
if err == nil {
buf.Write(line)
if _, err := buf.Write(line); err != nil {
return err
}
}
}
return err
Expand Down Expand Up @@ -653,7 +655,9 @@ func GetDgraphClient(conf *viper.Viper, login bool) (*dgo.Dgraph, CloseFunc) {

closeFunc := func() {
for _, c := range conns {
c.Close()
if err := c.Close(); err != nil {
glog.Warningf("Error closing connection to Dgraph client: %v", err)
}
}
}
return dg, closeFunc
Expand Down

0 comments on commit 747c847

Please sign in to comment.