Skip to content

Commit 0e1fa26

Browse files
committed
Add desync check to notifications iter
1 parent e9b8a75 commit 0e1fa26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/notification.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ impl<'a> Iterator for Iter<'a> {
100100
return Some(Ok(notification));
101101
}
102102

103+
if conn.is_desynchronized() {
104+
return Some(Err(Error::Io(desynchronized())));
105+
}
106+
103107
match conn.read_message_with_notification_nonblocking() {
104108
Ok(Some(NotificationResponse { pid, channel, payload })) => {
105109
Some(Ok(Notification {

0 commit comments

Comments
 (0)