Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
[dev] fix: properly route to new preview id after reload
Browse files Browse the repository at this point in the history
  • Loading branch information
EverlastingBugstopper committed Mar 3, 2020
1 parent 966b153 commit 0694634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/dev/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ async fn serve(
// create a closure that hyper will use later to handle HTTP requests
let make_service = make_service_fn(move |_| {
let client = client.to_owned();
let preview_id = preview_id.lock().unwrap().to_owned();
let server_config = server_config.to_owned();
let preview_id = preview_id.to_owned();
async move {
Ok::<_, failure::Error>(service_fn(move |req| {
let client = client.to_owned();
let preview_id = preview_id.to_owned();
let server_config = server_config.to_owned();
let preview_id = preview_id.lock().unwrap().to_owned();
let version = req.version();
let (parts, body) = req.into_parts();
let req_method = parts.method.to_string();
Expand Down

0 comments on commit 0694634

Please sign in to comment.