Make timeout configurable
This commit is contained in:
parent
2579a9860d
commit
5ac16db3fc
2 changed files with 11 additions and 10 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue