shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

[BUG] `this.doRefreshConfig()` method is not executed after restarting the plugin.

Open YxYL6125 opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

No response

Expected Behavior

No response

Steps To Reproduce

When I open the plugin for the first time, there is no deposit inside Singleton.INST, so the following code can be executed:

this.doRefreshConfig(globalLogConfig);
logCollector().start();

image-20231112144406521

image-20231112144440081

And it is also possible to execute this.close0(); the first time I close it.

image-20231112144522677

But when I start the plugin again, the doRefreshConfig() method will not be executed since it was saved to Singleton.INST the previous time.

image-20231112144625084

Also, when closing the plugin, since isStarted is not set to true, it will not be executed either. This ultimately causes the plugin to fail on subsequent startups and shutdowns.

image-20231112144643719

Environment

ShenYu version(s):2.6.0

Debug logs

No response

Anything else?

My thinking was to remove the value inside the Singleton.INST when closing the plugin. The doRefreshConfig method is then executed when the plugin is restarted.

YxYL6125 avatar Nov 12 '23 06:11 YxYL6125