conn: fix memory leak when using long timeouts
@@ -536,6 +536,10 @@ func (c *Conn) releaseStream(stream int) {
delete(c.calls, stream)
c.mu.Unlock()
+ if call.timer != nil {
+ call.timer.Stop()
+ }
+
streamPool.Put(call)
c.streams.Clear(stream)
}