MCPcopy Create free account
hub / github.com/astercloud/aster / Stop

Method Stop

pkg/desktop/bridge_tauri.go:116–133  ·  view source on GitHub ↗

Stop stops the HTTP server

(ctx context.Context)

Source from the content-addressed store, hash-verified

114
115// Stop stops the HTTP server
116func (b *TauriBridge) Stop(ctx context.Context) error {
117 if b.cancel != nil {
118 b.cancel()
119 }
120
121 // Close all SSE clients
122 b.sseMu.Lock()
123 for _, ch := range b.sseClients {
124 close(ch)
125 }
126 b.sseClients = make(map[string]chan *FrontendEvent)
127 b.sseMu.Unlock()
128
129 if b.server != nil {
130 return b.server.Shutdown(ctx)
131 }
132 return nil
133}
134
135// RegisterAgent registers an agent with the bridge
136func (b *TauriBridge) RegisterAgent(ag *agent.Agent) error {

Callers

nothing calls this directly

Calls 2

cancelMethod · 0.45
ShutdownMethod · 0.45

Tested by

no test coverage detected