MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / Shutdown

Method Shutdown

sdk/cliproxy/pprof_server.go:81–96  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

79}
80
81func (p *pprofServer) Shutdown(ctx context.Context) error {
82 if p == nil {
83 return nil
84 }
85 p.mu.Lock()
86 currentServer := p.server
87 currentAddr := p.addr
88 p.server = nil
89 p.enabled = false
90 p.mu.Unlock()
91
92 if currentServer == nil {
93 return nil
94 }
95 return p.stopServerWithContext(ctx, currentServer, currentAddr, "shutdown")
96}
97
98func (p *pprofServer) startServer(addr string) {
99 mux := newPprofMux()

Callers

nothing calls this directly

Calls 1

stopServerWithContextMethod · 0.95

Tested by

no test coverage detected