commit 4ea82cd3326fb1807fdd484839c50980a79464d8
parent 300dfc8a4e70fc6f95cf2f5e1c7f25bccb758856
Author: William Casarin <jb55@jb55.com>
Date: Fri, 16 Feb 2024 11:36:03 -0800
debug: fix annoying decode error message
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/enostr/src/relay/message.rs b/enostr/src/relay/message.rs
@@ -48,10 +48,7 @@ impl<'a> From<&'a WsMessage> for RelayEvent<'a> {
Ok(msg) => msg,
Err(err) => RelayEvent::Error(err),
},
- wsmsg => {
- //error!("got {:?} instead of WsMessage::Text", wsmsg);
- RelayEvent::Error(Error::DecodeFailed)
- }
+ wsmsg => RelayEvent::Other(wsmsg),
}
}
}
diff --git a/src/app.rs b/src/app.rs
@@ -186,7 +186,7 @@ fn try_process_event(damus: &mut Damus, ctx: &egui::Context) -> Result<()> {
RelayEvent::Opened => send_initial_filters(damus, &relay),
// TODO: handle reconnects
RelayEvent::Closed => warn!("{} connection closed", &relay),
- RelayEvent::Error(e) => error!("{}", e),
+ RelayEvent::Error(e) => error!("wsev->relayev: {}", e),
RelayEvent::Other(msg) => debug!("other event {:?}", &msg),
RelayEvent::Message(msg) => process_message(damus, &relay, &msg),
}