mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-11 23:50:07 +01:00
fix: std tcp listener must be non-blocking to create tokio tcplistener
This commit is contained in:
parent
665377e71f
commit
976d65d362
1 changed files with 1 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ async fn jwks() -> Json<Value> {
|
||||||
|
|
||||||
fn run_jwks_server() -> String {
|
fn run_jwks_server() -> String {
|
||||||
let listener = TcpListener::bind("0.0.0.0:0".parse::<SocketAddr>().unwrap()).unwrap();
|
let listener = TcpListener::bind("0.0.0.0:0".parse::<SocketAddr>().unwrap()).unwrap();
|
||||||
|
listener.set_nonblocking(true).unwrap();
|
||||||
let addr = listener.local_addr().unwrap();
|
let addr = listener.local_addr().unwrap();
|
||||||
let url = format!("http://{}:{}", addr.ip(), addr.port());
|
let url = format!("http://{}:{}", addr.ip(), addr.port());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue