Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update from the original author #3

Merged
merged 13 commits into from
Mar 31, 2017
Prev Previous commit
Next Next commit
conn: hold mutex while creating calls
closeWithError will hold the lock and close the channel, which we could
be assigning at the same time.
  • Loading branch information
Zariel committed Mar 22, 2017
commit c0389b80229ba45cb285ba15aae01df2deda81bf
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down