Don't reconnect when encountering 404
This commit is contained in:
parent
319de09c35
commit
be9d43f8cc
2 changed files with 8 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ use cookie::{Cookie, CookieJar};
|
|||
use tokio::select;
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
use tokio_tungstenite::tungstenite;
|
||||
use tokio_tungstenite::tungstenite::http::HeaderValue;
|
||||
use tokio_tungstenite::tungstenite::http::{HeaderValue, StatusCode};
|
||||
|
||||
use crate::api::packet::ParsedPacket;
|
||||
use crate::api::{Auth, AuthOption, Data, Nick};
|
||||
|
|
@ -364,6 +364,12 @@ impl Instance {
|
|||
idebug!(config, "Instance dropped");
|
||||
break;
|
||||
}
|
||||
Err(RunError::CouldNotConnect(tungstenite::Error::Http(response)))
|
||||
if response.status() == StatusCode::NOT_FOUND =>
|
||||
{
|
||||
iwarn!(config, "Failed to connect: room does not exist");
|
||||
break;
|
||||
}
|
||||
Err(RunError::CouldNotConnect(err)) => {
|
||||
iwarn!(config, "Failed to connect: {err}");
|
||||
false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue