mirror of
https://github.com/neondatabase/neon.git
synced 2026-10-27 14:06:45 +00:00
[proxy] Handle some unix signals.
On the surface, this doesn't add much, but there are some benefits: * We can do graceful shutdowns and thus record more code coverage data. * We now have a foundation for the more interesting behaviors, e.g. "stop accepting new connections after SIGTERM but keep serving the existing ones". * We give the otel machinery a chance to flush trace events before finally shutting down.
This commit is contained in:
@@ -186,8 +186,8 @@ async fn ws_handler(
|
||||
}
|
||||
|
||||
pub async fn task_main(
|
||||
ws_listener: TcpListener,
|
||||
config: &'static ProxyConfig,
|
||||
ws_listener: TcpListener,
|
||||
) -> anyhow::Result<()> {
|
||||
scopeguard::defer! {
|
||||
info!("websocket server has shut down");
|
||||
|
||||
Reference in New Issue
Block a user