conn: hold mutex while creating calls
@@ -590,11 +590,11 @@ func (c *Conn) exec(ctx context.Context, req frameWriter, tracer Tracer) (*frame
call = streamPool.Get().(*callReq)
}
c.calls[stream] = call
- c.mu.Unlock()
call.framer = framer
call.timeout = make(chan struct{})
call.streamID = stream
+ c.mu.Unlock()
if tracer != nil {
framer.trace()