fix(web): install the share-link provider before the panel serves (#6914)

The panel started answering requests before the share-link generator was
registered, so an "all links", client sub-links or Telegram link request that
arrived during start-up got "sub link provider not registered". NewServer now
takes the provider and installs it before anything listens, and the provider
registry is guarded by a lock, since start-up writes it while requests read it.
This commit is contained in:
25f2002654
2026-10-24 09:20:46 +05:30
committed by GitHub
parent ad470681ef
commit d2a0216e01
9 changed files with 125 additions and 20 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ func startContractNode(t *testing.T) *nodeUnderContract {
t.Cleanup(func() { runtime.SetManager(prevMgr) })
previous := global.GetWebServer()
s := NewServer()
s := NewServer(nil)
s.cron = cron.New(cron.WithLocation(time.Local), cron.WithSeconds())
global.SetWebServer(s)
t.Cleanup(func() {