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 e62770d commit 4b3aa2e
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 4b3aa2e

Please sign in to comment.