Zhixin Wen 7 лет назад
Родитель
Сommit
2e9f2912ba
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      conn.go

+ 2 - 0
conn.go

@@ -710,10 +710,12 @@ func (c *Conn) sendFrame(ctx context.Context, call *callReq, timeoutCh <-chan ti
 	case c.frameWriteArgChan <- call:
 		return nil
 	case <-timeoutCh:
+		c.releaseStream(call.streamID)
 		close(call.timeout)
 		c.handleTimeout()
 		return ErrTimeoutNoResponse
 	case <-ctxDone:
+		c.releaseStream(call.streamID)
 		close(call.timeout)
 		return ctx.Err()
 	case <-c.quit: