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.
This commit removes the Logger call from the
onEvent
method in the Zookeeper event handling code.Previously, invoking
p.cluster.Logger()
before thecluster
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.