Hangfire.Console
Hangfire.Console copied to clipboard
Fix concurrency issues
The UseConsole call may fail if evaluated concurrently (for instance a test runner running multiple integration tests in parallel).
This should never happen.
It seems to happen because an Contains call to the RouteCollection fails, because the collection has been modified by something else in the meanwhile.
Perhaps we should throw a lock statement around the call?