fix the websocket worker
This commit is contained in:
parent
006b7ff92a
commit
33cdb2545f
|
@ -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"
|
||||
token = "ro-discord-a68a5519-8469-4a4b-93ee-5863cd0bf2b9"
|
|
@ -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<dyn Error>> {
|
|||
}
|
||||
}
|
||||
Err(e) => {
|
||||
if matches!(e, WebSocketError::NoDataAvailable) {
|
||||
continue;
|
||||
}
|
||||
error!("rx error: {}", e);
|
||||
return Err(e.into());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue