Skip to content
Snippets Groups Projects
Verified Commit 0e22eb2e authored by Nina's avatar Nina
Browse files

Fix crashing without connection upgrade header

parent 9f1ade39
Branches main
No related tags found
No related merge requests found
......@@ -125,16 +125,18 @@ async fn main() -> Result<(), IoError> {
let ws = match ws {
Err(e) => {
eprintln!("Unable to accept socket: {}", e);
return Ok(());
// return Ok(());
},
Ok(o) => {
tokio::spawn(handle_connection(
state.clone(),
o,
addr,
channel_id.borrow().to_string(),
));
},
Ok(o) => o,
};
tokio::spawn(handle_connection(
state.clone(),
ws,
addr,
channel_id.borrow().to_string(),
));
// tokio::spawn(handle_connection(state.clone(), stream, addr, &channel_id));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment