fix: make Core restart failures explicit - #332
Closed
Ezio1997-K wants to merge 1 commit into
Closed
Conversation
Owner
|
部分已合并 其中过度设计的逻辑未添加 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make Core startup/restart failures explicit and preserve useful diagnostics:
try/finally, soisStartingalways resets;preload()wait for the first Core startup result;false;checkCoreHealth()checks only IPC/control-plane health, not TUN or mixed-port data-plane health.This complements #209 but does not change profile apply ordering and does not add automatic restart/watchdog behavior.
Why
In #330 the App, Core process, Helper and mixed-port listener can remain alive while TUN/mixed traffic is unavailable. Treating socket connection or
getIsInitas proof of full health leaves the UI showing stale nodes/status and hides restart failures.The change deliberately avoids automatic self-healing restarts: a failed restart can extend an outage, and silently restarting would erase useful evidence.
Verification
dart formaton all five modified Dart files: clean;dart analyze lib/clash/core_startup.dart: no issues;git diff --check: PASS.Not run locally:
flutter test/ whole-project analyze;The local environment did not have Flutter installed; this limitation is intentionally reported rather than treating the standalone Dart checks as a full Flutter build.
Related: #330, #209