Skip to content

Ad-hoc HTTP server for Oauth2 Flow #9483

Discussion options

You must be logged in to vote

There is something I am missing due to my limited rust experience.

The let mut svr = server_state.0.lock().await; line will keep ServerState locked forever currently. Try adding drop(svr); after .run(); but before server.await (because the function will block on server.await until the server shuts down, therefore svr will never go out of scope == will never be unlocked)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@david-mk-lawrence
Comment options

Answer selected by david-mk-lawrence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants