Skip to content

Commit

Permalink
fix/close-invoke-race: releasing lock when Invoke exits early
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Dec 8, 2023
1 parent d736bd4 commit c691d67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ func (cc *ClientConn) Invoke(ctx context.Context, method string, args interface{
cc.mu.RLock()
if cc.conn == nil {
// Close() has been called
cc.mu.RUnlock()
return errors.New("client Close() called")
}
cc.conn.mu.RLock()
Expand Down

0 comments on commit c691d67

Please sign in to comment.