Skip to content

Commit

Permalink
Merge pull request #1042 from qazwsxedckll/fix/pidcache
Browse files Browse the repository at this point in the history
fix: nil pointer
  • Loading branch information
rogeralsing authored Mar 22, 2024
2 parents cdac50e + 0654eee commit c318a5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cluster/default_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ func (dcc *DefaultContext) getPid(identity, kind string) *actor.PID {
pid, _ := dcc.cluster.PidCache.Get(identity, kind)
if pid == nil {
pid = dcc.cluster.Get(identity, kind)
dcc.cluster.PidCache.Set(identity, kind, pid)
if pid != nil {
dcc.cluster.PidCache.Set(identity, kind, pid)
}
}

return pid
Expand Down

0 comments on commit c318a5a

Please sign in to comment.