Skip to content

Commit

Permalink
cargo update
Browse files Browse the repository at this point in the history
  • Loading branch information
lz1998 committed Aug 24, 2022
1 parent e0c1a53 commit 68fd1cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/bot/bots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ use std::time::Duration;

use dashmap::DashMap;
use lazy_static::lazy_static;
use ricq::client::DefaultConnector;
use ricq::{
ext::common::after_login,
ext::reconnect::{auto_reconnect, Credential, DefaultConnector},
ext::reconnect::{auto_reconnect, Credential},
handler::QEvent,
Client,
};
Expand Down
3 changes: 2 additions & 1 deletion src/handler/password.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ use axum::Json;
use dashmap::DashMap;
use lazy_static::lazy_static;
use rand::{prelude::StdRng, SeedableRng};
use ricq::client::{Connector, DefaultConnector};
use ricq::{
client::NetworkStatus,
device::Device,
ext::reconnect::{Connector, Credential, DefaultConnector, Password},
ext::reconnect::{Credential, Password},
handler::QEvent,
version::{get_version, Protocol},
Client, LoginDeviceLocked, LoginNeedCaptcha, LoginResponse,
Expand Down
6 changes: 3 additions & 3 deletions src/handler/qrcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use dashmap::DashMap;
use lazy_static::lazy_static;
use rand::rngs::StdRng;
use rand::SeedableRng;
use ricq::client::{Connector, DefaultConnector};
use ricq::{
client::NetworkStatus,
device::Device,
Expand Down Expand Up @@ -79,9 +80,8 @@ pub async fn create(Json(req): Json<CreateClientReq>) -> RCResult<Json<CreateCli
};
let (sender, receiver) = tokio::sync::broadcast::channel(10);
let cli = Arc::new(Client::new(device, get_version(protocol), sender));
let stream = tokio::net::TcpStream::connect(cli.get_address())
.await
.map_err(RCError::IO)?;
let connector = DefaultConnector;
let stream = connector.connect(&cli).await?;
let c = cli.clone();
let network_join_handle = tokio::spawn(async move { c.start(stream).await });
tokio::task::yield_now().await;
Expand Down

0 comments on commit 68fd1cc

Please sign in to comment.