Преглед изворни кода

Return stream id to the pool in case of a write error.

Harpreet Sawhney пре 12 година
родитељ
комит
3d65e205b4
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      conn.go

+ 1 - 0
conn.go

@@ -272,6 +272,7 @@ func (c *Conn) exec(op operation, trace Tracer) (interface{}, error) {
 
 	if n, err := c.conn.Write(req); err != nil {
 		c.conn.Close()
+		c.uniq <- id
 		if n > 0 {
 			return nil, ErrProtocol
 		}