fix: check_notify
This commit is contained in:
parent
4bb7b4997f
commit
0d8a63cdfc
@ -1,5 +1,7 @@
|
|||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
|
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
use fallible_iterator::FallibleIterator;
|
use fallible_iterator::FallibleIterator;
|
||||||
use tokio_postgres::{Column, Notification};
|
use tokio_postgres::{Column, Notification};
|
||||||
use tokio_postgres::row::RowIndex;
|
use tokio_postgres::row::RowIndex;
|
||||||
@ -194,7 +196,7 @@ impl GenericClient for Client {
|
|||||||
|
|
||||||
fn check_for_notify(&mut self) -> Result<Option<Notification>, Self::Error> {
|
fn check_for_notify(&mut self) -> Result<Option<Notification>, Self::Error> {
|
||||||
let mut n = self.notifications();
|
let mut n = self.notifications();
|
||||||
let mut n = n.iter();
|
let mut n = n.timeout_iter(Duration::from_millis(500));
|
||||||
n.next()
|
n.next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user