Skip to content

Commit c318a5a

Browse files
authored
Merge pull request #1042 from qazwsxedckll/fix/pidcache
fix: nil pointer
2 parents cdac50e + 0654eee commit c318a5a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cluster/default_context.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ func (dcc *DefaultContext) getPid(identity, kind string) *actor.PID {
159159
pid, _ := dcc.cluster.PidCache.Get(identity, kind)
160160
if pid == nil {
161161
pid = dcc.cluster.Get(identity, kind)
162-
dcc.cluster.PidCache.Set(identity, kind, pid)
162+
if pid != nil {
163+
dcc.cluster.PidCache.Set(identity, kind, pid)
164+
}
163165
}
164166

165167
return pid

0 commit comments

Comments
 (0)