mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-14 23:19:07 -05:00
More error handling/debugging
This commit is contained in:
parent
25ac86cc68
commit
ba19c978a5
|
@ -86,6 +86,7 @@ async fn process_client(stream: WebSocketStream<TcpStream>) {
|
||||||
)))
|
)))
|
||||||
.await
|
.await
|
||||||
.expect("send failed");
|
.expect("send failed");
|
||||||
|
// Handle this request. Everything else below is basically error handling.
|
||||||
}
|
}
|
||||||
Ok(Message::Binary(_)) => {
|
Ok(Message::Binary(_)) => {
|
||||||
info!("Ignoring Binary message");
|
info!("Ignoring Binary message");
|
||||||
|
@ -129,7 +130,8 @@ async fn process_client(stream: WebSocketStream<TcpStream>) {
|
||||||
debug!("Closing this connection normally");
|
debug!("Closing this connection normally");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Err(Tls(_)) | Err(Protocol(_)) | Err(Utf8) | Err(Url(_)) => {
|
Err(Tls(_)) | Err(Protocol(_)) | Err(Utf8) | Err(Url(_)) | Err(HttpFormat(_))
|
||||||
|
| Err(Http(_)) => {
|
||||||
info!("websocket/tls/enc protocol error, dropping connection");
|
info!("websocket/tls/enc protocol error, dropping connection");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user