mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-10-18 21:31:49 -04:00
fix(async): clone Ref to avoid holding it across a suspend point
This commit is contained in:
parent
dbda1bb94a
commit
5cbb41c247
@ -87,7 +87,7 @@ async fn upload(
|
||||
client: web::Data<Client>,
|
||||
config: web::Data<Arc<Mutex<Config>>>,
|
||||
) -> Result<HttpResponse, Error> {
|
||||
let connection = request.connection_info();
|
||||
let connection = request.connection_info().clone();
|
||||
let host = connection.remote_addr().unwrap_or("unknown host");
|
||||
auth::check(host, request.headers(), env::var("AUTH_TOKEN").ok())?;
|
||||
let expiry_date = header::parse_expiry_date(request.headers())?;
|
||||
|
Loading…
Reference in New Issue
Block a user