cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
20.21k stars 1.1k forks source link

Shutdown Proxy Server #299

Closed PatrickDarmawi closed 1 week ago

PatrickDarmawi commented 1 week ago

Is there a way I can shut down the proxy server when encountering a specific error? I looked into the docs/available methods and couldn't find a way.

eaufavor commented 1 week ago

If you just want to hard stop, since a Pingora server is a multithreaded single process you can just std::process::exit(1) to stop the entire process.

PatrickDarmawi commented 1 week ago

Thanks!