This commit is contained in:
Eugene Pankov 2022-09-02 15:57:34 +02:00
parent 51df7083de
commit a2bbc1690e
No known key found for this signature in database
GPG key ID: 5896FCBBDD1CF4F4
5 changed files with 5 additions and 10 deletions

View file

@ -299,7 +299,7 @@ async fn get_auth_state(
return None;
};
let Some(state_arc) = store.get(&id) else {
let Some(state_arc) = store.get(id) else {
return None;
};

View file

@ -193,9 +193,7 @@ pub async fn get_auth_state_for_request(
match session.get_auth_state_id() {
Some(id) => Ok(store.get(&id.0).ok_or(WarpgateError::InconsistentState)?),
None => {
let (id, state) = store
.create(username, crate::common::PROTOCOL_NAME)
.await?;
let (id, state) = store.create(username, crate::common::PROTOCOL_NAME).await?;
session.set(AUTH_STATE_ID_SESSION_KEY, AuthStateId(id));
Ok(state)
}

View file

@ -185,9 +185,7 @@ impl ProtocolServer for HTTPProtocolServer {
let request = poem::Request::builder().uri_str("http://host/").finish();
crate::proxy::proxy_normal_request(&request, poem::Body::empty(), &options)
.await
.map_err(|e| {
TargetTestError::ConnectionError(format!("{e}"))
})?;
.map_err(|e| TargetTestError::ConnectionError(format!("{e}")))?;
Ok(())
}
}

View file

@ -105,8 +105,7 @@ impl SessionStore {
let services = Data::<&Services>::from_request_without_body(req).await?;
let remote_address: &RemoteAddr = <_>::from_request_without_body(req).await?;
let session_storage =
Data::<&SharedSessionStorage>::from_request_without_body(req).await?;
let session_storage = Data::<&SharedSessionStorage>::from_request_without_body(req).await?;
let (session_handle, mut session_handle_rx) = HttpSessionHandle::new();

View file

@ -39,7 +39,7 @@ impl ServiceOutput {
#[allow(clippy::indexing_slicing)]
let tick = ticks[tick_index];
let badge = Colour::Black.on(Colour::Blue).paint(format!(" {} Warpgate connecting ", tick)).to_string();
let _ = output_tx.send(Bytes::from([&ERASE_PROGRESS_SPINNER_BUF[..], badge.as_bytes()].concat()));
let _ = output_tx.send(Bytes::from([ERASE_PROGRESS_SPINNER_BUF, badge.as_bytes()].concat()));
}
}
}