Bugfix/patch db subscriber (#2652)

* fix socket sending empty patches

* do not timeout tcp connections, just poll them more

* switch from poll to tcp keepalive
This commit is contained in:
Aiden McClelland
2024-06-24 16:15:56 -06:00
committed by GitHub
parent 2c255b6dfe
commit 9da49be44d
7 changed files with 83 additions and 64 deletions

View File

@@ -112,24 +112,6 @@ pub async fn find_eth_iface() -> Result<String, Error> {
))
}
#[pin_project::pin_project]
pub struct SingleAccept<T>(Option<T>);
impl<T> SingleAccept<T> {
pub fn new(conn: T) -> Self {
Self(Some(conn))
}
}
// impl<T> axum_server::accept::Accept for SingleAccept<T> {
// type Conn = T;
// type Error = Infallible;
// fn poll_accept(
// self: std::pin::Pin<&mut Self>,
// _cx: &mut std::task::Context<'_>,
// ) -> std::task::Poll<Option<Result<Self::Conn, Self::Error>>> {
// std::task::Poll::Ready(self.project().0.take().map(Ok))
// }
// }
pub struct TcpListeners {
listeners: Vec<TcpListener>,
}