Skip to content

Commit

Permalink
deper: ensure upgrades are allowed on derp
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed May 3, 2023
1 parent e60dc7f commit 4f9cc86
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bin/derper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ async fn main() -> Result<()> {
};
let derp_server: derp::Server<OwnedReadHalf, OwnedWriteHalf, derp::HttpClient> =
derp::Server::new(cfg.private_key, mesh_key);
info!("DERP server configured");
Some(derp_server)
} else {
None
Expand Down Expand Up @@ -425,8 +426,10 @@ impl Derper {
debug!("[DERP] Connection opened from {}", peer_addr);
let handler = handler.clone();
tokio::task::spawn(async move {
if let Err(err) =
Http::new().serve_connection(stream, handler).await
if let Err(err) = Http::new()
.serve_connection(stream, handler)
.with_upgrades()
.await
{
error!("[DERP] Failed to serve connection: {:?}", err);
}
Expand Down

0 comments on commit 4f9cc86

Please sign in to comment.