mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-21 20:09:48 -05:00
fix(async): clone Ref to avoid holding it across a suspend point
This commit is contained in:
parent
dbda1bb94a
commit
5cbb41c247
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue