use system resolver if no dns servers specified, make invalid frame type more verbose

This commit is contained in:
Toshit Chawda 2024-09-22 09:07:44 -07:00
parent f798b5544e
commit fdd641c67f
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
5 changed files with 53 additions and 16 deletions

View file

@ -70,7 +70,7 @@ pub enum WispError {
StreamAlreadyClosed,
/// The websocket frame received had an invalid type.
WsFrameInvalidType,
WsFrameInvalidType(ws::OpCode),
/// The websocket frame received was not finished.
WsFrameNotFinished,
/// Error specific to the websocket implementation.
@ -133,7 +133,7 @@ impl std::fmt::Display for WispError {
Self::MaxStreamCountReached => write!(f, "Maximum stream count reached"),
Self::IncompatibleProtocolVersion => write!(f, "Incompatible Wisp protocol version"),
Self::StreamAlreadyClosed => write!(f, "Stream already closed"),
Self::WsFrameInvalidType => write!(f, "Invalid websocket frame type"),
Self::WsFrameInvalidType(ty) => write!(f, "Invalid websocket frame type: {:?}", ty),
Self::WsFrameNotFinished => write!(f, "Unfinished websocket frame"),
Self::WsImplError(err) => write!(f, "Websocket implementation error: {}", err),
Self::WsImplSocketClosed => {