Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
CAGS295 committed Aug 17, 2024
1 parent 1392070 commit 84f30cd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ reqwest = { version = "^0.12", default-features = false, features = [
"native-tls-vendored",
] }
tokio = { version = "1.20.1", features = ["rt", "macros", "rt-multi-thread"] }
tokio-tungstenite = { version = "0.18", features = ["native-tls-vendored"] }
tokio-tungstenite = { version = "^0", features = ["native-tls-vendored"] }
tracing = { version = "0.1.36", features = ["attributes"] }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
url = "2.2.2"
Expand Down
3 changes: 1 addition & 2 deletions src/net/streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use tokio_tungstenite::MaybeTlsStream;
use tokio_tungstenite::WebSocketStream;
use tracing::debug;
use tracing::{error, info};
use url::Url;

pub(crate) struct MultiSymbolStream;

Expand Down Expand Up @@ -63,7 +62,7 @@ impl MultiSymbolStream {
P: Endpoints<M> + Sync,
{
let mut stream = {
let url = Url::parse(provider.websocket_url().as_str()).expect("invalid websocket");
let url = provider.websocket_url().parse().expect("invalid websocket");
connect(url).await.expect("stream")
};

Expand Down
6 changes: 3 additions & 3 deletions src/net/ws_adapter.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
use http::Uri;
use tokio::net::TcpStream;
use tokio_tungstenite::{
connect_async_tls_with_config,
tungstenite::{Error, Result},
MaybeTlsStream, WebSocketStream,
};
use tracing::debug;
use url::Url;

type WebSocket<S> = WebSocketStream<MaybeTlsStream<S>>;

pub async fn connect(ws_uri: Url) -> Result<WebSocket<TcpStream>, Error> {
pub async fn connect(ws_uri: Uri) -> Result<WebSocket<TcpStream>, Error> {
let (socket, res): (WebSocket<_>, _) =
connect_async_tls_with_config(ws_uri, None, None).await?;
connect_async_tls_with_config(ws_uri, None, false, None).await?;
debug!("Connection response: {res:?}");
Ok(socket)
}
Expand Down
3 changes: 1 addition & 2 deletions src/servers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use hyper_util::rt::{TokioExecutor, TokioIo, TokioTimer};
use left_right::ReadHandleFactory;
use std::collections::HashMap;
use std::net::Ipv6Addr;
use std::time::Duration;
use tokio::sync::mpsc::UnboundedReceiver;
use tower::Service;
use tracing::{error, info, warn};
Expand Down Expand Up @@ -88,7 +87,7 @@ async fn inner_start(
tower_service.clone().call(req)
});

let mut builder = hyper_util::server::conn::auto::Builder::new(TokioExecutor::new());
let builder = hyper_util::server::conn::auto::Builder::new(TokioExecutor::new());
//builder.keep_alive_interval(Some(Duration::from_millis(500)));
//builder.timer(TokioTimer::new());

Expand Down

0 comments on commit 84f30cd

Please sign in to comment.