mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-04 03:52:56 +00:00
refactor: postgres_backend: replace abstract shutdown_watcher with CancellationToken (#8295)
Preliminary refactoring while working on https://github.com/neondatabase/neon/issues/7427 and specifically https://github.com/neondatabase/neon/pull/8286
This commit is contained in:
committed by
GitHub
parent
abc330e095
commit
3f7aebb01c
@@ -4,9 +4,10 @@
|
||||
//!
|
||||
use anyhow::{Context, Result};
|
||||
use postgres_backend::QueryError;
|
||||
use std::{future, time::Duration};
|
||||
use std::time::Duration;
|
||||
use tokio::net::TcpStream;
|
||||
use tokio_io_timeout::TimeoutReader;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tracing::*;
|
||||
use utils::{auth::Scope, measured_stream::MeasuredStream};
|
||||
|
||||
@@ -100,7 +101,7 @@ async fn handle_socket(
|
||||
// libpq protocol between safekeeper and walproposer / pageserver
|
||||
// We don't use shutdown.
|
||||
pgbackend
|
||||
.run(&mut conn_handler, future::pending::<()>)
|
||||
.run(&mut conn_handler, &CancellationToken::new())
|
||||
.await
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user