Add desync check to notifications iter

This commit is contained in:
Steven Fackler
2015-12-28 17:07:18 -07:00
parent e9b8a75e45
commit 0e1fa26b48

View File

@@ -100,6 +100,10 @@ impl<'a> Iterator for Iter<'a> {
return Some(Ok(notification));
}
if conn.is_desynchronized() {
return Some(Err(Error::Io(desynchronized())));
}
match conn.read_message_with_notification_nonblocking() {
Ok(Some(NotificationResponse { pid, channel, payload })) => {
Some(Ok(Notification {