Make timeout configurable

This commit is contained in:
Joscha 2022-08-20 23:50:00 +02:00
parent 2579a9860d
commit 5ac16db3fc
2 changed files with 11 additions and 10 deletions

View file

@ -45,7 +45,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let start = Instant::now();
let (ws, _) = tokio_tungstenite::connect_async(URI).await?;
let (tx, mut rx) = euphoxide::conn::wrap(ws);
let (tx, mut rx) = euphoxide::conn::wrap(ws, Duration::from_secs(30));
while let Some(packet) = rx.recv().await {
let data = match packet.content {
Ok(data) => data,