fix: check_notify

This commit is contained in:
2023-07-27 15:18:43 -05:00
parent 4bb7b4997f
commit 0d8a63cdfc

View File

@@ -1,5 +1,7 @@
#![allow(missing_docs)]
use std::time::Duration;
use fallible_iterator::FallibleIterator;
use tokio_postgres::{Column, Notification};
use tokio_postgres::row::RowIndex;
@@ -194,7 +196,7 @@ impl GenericClient for Client {
fn check_for_notify(&mut self) -> Result<Option<Notification>, Self::Error> {
let mut n = self.notifications();
let mut n = n.iter();
let mut n = n.timeout_iter(Duration::from_millis(500));
n.next()
}
}