소스 검색

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 년 전
부모
커밋
e93451502d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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