Browse Source

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

Harpreet Sawhney 11 years ago
parent
commit
3d65e205b4
1 changed files with 1 additions and 0 deletions
  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
 		}