diff --git a/websocket-worker/config.toml b/websocket-worker/config.toml index 97f246b..5328fad 100644 --- a/websocket-worker/config.toml +++ b/websocket-worker/config.toml @@ -1,6 +1,6 @@ websockets = [ "https://discord.com/api/webhooks/1130340476797583380/0RBp48jK4x3qjKYcmypjw4ydm3GoK2r_D-yzz95b5cnBHtq8lsFx66kJnmniIVAe8H4u" ] -api_status_url = "http://localhost:8171/status" +api_status_url = "https://data-api.locationoverflow.coredoes.dev/status" workers = 8 -token = "test-ro-token" \ No newline at end of file +token = "ro-discord-a68a5519-8469-4a4b-93ee-5863cd0bf2b9" \ No newline at end of file diff --git a/websocket-worker/src/main.rs b/websocket-worker/src/main.rs index 87922de..39c702e 100644 --- a/websocket-worker/src/main.rs +++ b/websocket-worker/src/main.rs @@ -6,7 +6,7 @@ use serenity::http::Http; use serenity::model::webhook::Webhook; use tokio_threadpool::ThreadPool; use url::Url; -use websocket::{ClientBuilder, Message, OwnedMessage}; +use websocket::{ClientBuilder, Message, OwnedMessage, WebSocketError}; use websocket::websocket_base::result::WebSocketResult; use common::message::{GatewayChatMessage, GatewayPacketC2S, GatewayPacketS2C}; use common::status::{DATA_API_VERSION, Status}; @@ -99,6 +99,9 @@ async fn main() -> Result<(), Box> { } } Err(e) => { + if matches!(e, WebSocketError::NoDataAvailable) { + continue; + } error!("rx error: {}", e); return Err(e.into()); }