-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic config /reference_config.go line 105 #2439
Comments
@ijustyce ReferenceConfig must be defined within ConsumerConfig, as this dubbogo.yml shows: dubbo:
registries:
demoZK:
protocol: zookeeper
timeout: 3s
address: 127.0.0.1:2181
consumer:
references:
GreeterClientImpl:
protocol: tri
interface: com.apache.dubbo.sample.basic.IGreeter ReferenceConfig.Init() is invoked by ConsumerConfig.Init(). As a result, there is no problem with nil pointer. |
In our case, I'm responsible for config module and one of my colleagues told me if there is no consumer config then panic at ReferenceConfig.Init. As ReferenceConfig.Init() is a public method so we can call it manually and root.Consumer may be nil as it is a pointer. |
@ijustyce Got it. We would fix it as soon as possible. |
It's hard to answer person after person's question and tell them how to avoid it, as we all know users often use things in ways we never thought of. |
Thank you very much for your case! By the way, after |
Call refConfig.GenericLoad("xxx"), no wrap. |
Code show as below, consumer field is a pointer so may be nil.
The text was updated successfully, but these errors were encountered: