Browse Source

Merge pull request #619 from Zariel/debug-control-errors

log control connection errors with debug
Chris Bannister 9 years ago
parent
commit
a12c399324
1 changed files with 4 additions and 0 deletions
  1. 4 0
      control.go

+ 4 - 0
control.go

@@ -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