You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't really worked much with dynamic libraries but I suppose the solution would be to use a random number for the ids instead of incrementing an atomic counter. Wdyt?
I would worry about introducing that kind of non-determinism. It could still lead to duplicate usage of an ID, even if very unlikely. Couldn't we just have a regular u64 inside Router that is used for the RouteId and incremented in the two places we currently use RouteId::next()?
Thanks for the quick fix! I wasn't sure if this even was a supported use case, since core Tokio has a few similar issues that can't really be fixed without breaking changes.
Bug Report
Version
├── axum v0.6.9
│ ├── axum-core v0.3.2
Platform
Linux
Description
Adding routes to a router from a shared library causes routes to point to the wrong handlers. I'm guessing this is the issue.
Route
/a
should respond withA
instead ofC
minimal example repo
main.rs
dylib.rs
The text was updated successfully, but these errors were encountered: