mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-20 03:57:03 +00:00
bugfix: Prevent a panic and return a reasonable default
This commit is contained in:
parent
3207baa41a
commit
8e73ddaa21
@ -75,7 +75,10 @@ impl Feed {
|
||||
|
||||
pub(crate) fn current_anchor(&self) -> Unixtime {
|
||||
let anchor_key = self.current_feed_kind.read().anchor_key();
|
||||
*self.feed_anchors.get(&anchor_key).unwrap()
|
||||
*self
|
||||
.feed_anchors
|
||||
.get(&anchor_key)
|
||||
.unwrap_or(Unixtime::now().unwrap())
|
||||
}
|
||||
|
||||
fn unlisten(&self) {
|
||||
|
Loading…
Reference in New Issue
Block a user