[BUG] Redundant REST router refreshes
kon14 opened this issue · comments
Konstantinos Feretos commented
Describe the bug
REST router currently refreshes excessively due to refreshRouter()
directly refreshing the Express router instead of scheduling a refresh based on a timeout, much like registerRoute()
and registerConduitRoute()
already do.
To Reproduce
- Set a breakpoint in REST controller's
refreshRouter()
- Debug Core by itself
- Notice excessive refreshes
N of refresh calls would differ based on previously registered routes, but on a fresh Redis state it should be 1.
Expected behavior
refreshRouter()
should schedule a router refresh instead of directly refreshing Express.