mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 14:00:01 -04:00
exit on error, remove debug print
This commit is contained in:
parent
9590b1eb49
commit
f54c2d3315
1 changed files with 2 additions and 9 deletions
|
@ -11,13 +11,7 @@ use hyper::{
|
||||||
};
|
};
|
||||||
use simple_moving_average::{SingleSumSMA, SMA};
|
use simple_moving_average::{SingleSumSMA, SMA};
|
||||||
use std::{
|
use std::{
|
||||||
error::Error,
|
error::Error, future::Future, io::{stdout, IsTerminal, Write}, net::SocketAddr, process::exit, sync::Arc, time::{Duration, Instant}, usize
|
||||||
future::Future,
|
|
||||||
io::{stdout, IsTerminal, Write},
|
|
||||||
net::SocketAddr,
|
|
||||||
sync::Arc,
|
|
||||||
time::{Duration, Instant},
|
|
||||||
usize,
|
|
||||||
};
|
};
|
||||||
use tokio::{
|
use tokio::{
|
||||||
net::TcpStream,
|
net::TcpStream,
|
||||||
|
@ -126,8 +120,6 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||||
.header("Sec-WebSocket-Protocol", "wisp-v1")
|
.header("Sec-WebSocket-Protocol", "wisp-v1")
|
||||||
.body(Empty::<Bytes>::new())?;
|
.body(Empty::<Bytes>::new())?;
|
||||||
|
|
||||||
println!("{:?}", req);
|
|
||||||
|
|
||||||
let (ws, _) = handshake::client(&SpawnExecutor, req, socket).await?;
|
let (ws, _) = handshake::client(&SpawnExecutor, req, socket).await?;
|
||||||
|
|
||||||
let (rx, tx) = ws.split(tokio::io::split);
|
let (rx, tx) = ws.split(tokio::io::split);
|
||||||
|
@ -218,6 +210,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||||
|
|
||||||
if let Err(err) = out.0? {
|
if let Err(err) = out.0? {
|
||||||
println!("\n\nerr: {:?}", err);
|
println!("\n\nerr: {:?}", err);
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
out.2.into_iter().for_each(|x| x.abort());
|
out.2.into_iter().for_each(|x| x.abort());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue