asynkron / protoactor-go

Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
http://proto.actor
Apache License 2.0
5.02k stars 521 forks source link

Fix panic due to early onEvent Logger call in Zookeeper event handling #1028

Closed ytake closed 7 months ago

ytake commented 7 months ago

This commit removes the Logger call from the onEvent method in the Zookeeper event handling code.
Previously, invoking p.cluster.Logger() before the cluster was fully resolved led to a runtime panic error (panic: runtime error: invalid memory address or nil pointer dereference).

This change is a workaround to avoid the immediate crash.

I think you need to refactor the initialization sequence of the "provider" and its dependencies to ensure that the "cluster" is available before any event processing takes place.

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.