Skip to content

Commit

Permalink
cherry-pick: channelz: fix race accessing channelMap without lock (#7079
Browse files Browse the repository at this point in the history
) (#7080)
  • Loading branch information
dfawley authored Apr 3, 2024
1 parent e62770d commit 8854761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/channelz/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func RegisterSubChannel(pid int64, ref string) *SubChannel {
RefName: ref,
ID: id,
sockets: make(map[int64]string),
parent: db.channels[pid],
parent: db.getChannel(pid),
trace: &ChannelTrace{CreationTime: time.Now(), Events: make([]*traceEvent, 0, getMaxTraceEntry())},
}
db.addSubChannel(id, sc, pid)
Expand Down

0 comments on commit 8854761

Please sign in to comment.