Skip to content

Commit

Permalink
Merge pull request #619 from Zariel/debug-control-errors
Browse files Browse the repository at this point in the history
log control connection errors with debug
  • Loading branch information
Zariel committed Jan 31, 2016
2 parents 8c402ed + f221a8d commit a12c399
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions control.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ func (c *controlConn) query(statement string, values ...interface{}) (iter *Iter
return conn.executeQuery(q)
})

if debug && iter.err != nil {
log.Printf("control: error executing %q: %v\n", statement, iter.err)
}

q.attempts++
if iter.err == nil || !c.retry.Attempt(q) {
break
Expand Down

0 comments on commit a12c399

Please sign in to comment.