Browse Source

Remove check for available streams

A connection should be pickable even if no streams are currently
available. In this case, when executing the query, the connection will
block reading from the streams channel [see func (c *Conn) exec(...)]
until one is available.

This avoids 'unavailable' errors when there are more than
numConns*numStreams queries pending.
Miguel Serrano 11 years ago
parent
commit
e93451502d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      conn.go

+ 1 - 1
conn.go

@@ -423,7 +423,7 @@ func (c *Conn) executeQuery(qry *Query) *Iter {
 }
 
 func (c *Conn) Pick(qry *Query) *Conn {
-	if c.Closed() || len(c.uniq) == 0 {
+	if c.Closed() {
 		return nil
 	}
 	return c