Skip to content

Commit

Permalink
channelz: fix race accessing channelMap without lock (#7079)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley committed Apr 3, 2024
1 parent 4ec8307 commit b7346ae
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 b7346ae

Please sign in to comment.