Skip to content

Commit 4cff665

Browse files
committed
ack: preparations for reconnect
1 parent df89018 commit 4cff665

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/acknowledgement.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ impl Acknowledgements {
6262
pub(crate) fn on_channel_error(&self, error: Error) {
6363
self.0.lock().on_channel_error(error);
6464
}
65+
66+
pub(crate) fn reset(&self, error: Error) {
67+
self.0.lock().reset(error);
68+
}
6569
}
6670

6771
impl fmt::Debug for Acknowledgements {
@@ -174,4 +178,9 @@ impl Inner {
174178
}
175179
}
176180
}
181+
182+
fn reset(&mut self, error: Error) {
183+
self.delivery_tag = IdSequence::new(false);
184+
self.on_channel_error(error);
185+
}
177186
}

0 commit comments

Comments
 (0)