cli: Fix disconnection timestamp

It should show since when we've been disconnected.
This commit is contained in:
cloudhead 2024-06-19 20:37:36 +02:00
parent dd7a0b3524
commit 0a7a9c2945
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -272,10 +272,10 @@ pub fn sessions(node: &Node) -> Result<Option<term::Table<4, term::Label>>, node
term::Label::from(term::format::positive("connected")),
term::format::dim(now - since).into(),
),
node::State::Disconnected { retry_at, .. } => (
node::State::Disconnected { since, .. } => (
sess.addr.to_string().into(),
term::Label::from(term::format::negative("disconnected")),
term::format::dim(retry_at - now).into(),
term::format::dim(now - since).into(),
),
};
table.push([nid, addr, state, time]);