Hello,
I use warp as a server:
let r2 = warp::path("r2");
let route_2 = r2
.and(warp::post())
.and(warp::body::json())
.and(with_db(db_pool.clone()))
.and_then(handlers::post_handler); // post cmd_result to the database```
let routes = test_route
.or(route_1)
.or(route_2)
.with(warp::cors().allow_any_origin())
.recover(error::handle_rejection);
warp::serve(routes).run(server).await;
And i use a client with reqwest. Let's say:
loop{
let client = reqwest::Client::new();
let res = client.post("http:// .... /r1")
.body("body 1")
.send()
.await?;
=====> sleep 5 min for example
let res = client.post("http:// .... /r2")
.body("body 2")
.send()
.await?;
}
If a shutdown the warp server during this 5 min sleep, the reqwest client shutdown too. I would like to prevent that, and that the client still continues to submit request to the server.
Any idea?
Thanks