Closed mcollina closed 1 year ago
Yeah, looking into it, I think that code was an attempt to keep support for a global websocket connection handler that this library used to support. Once this library started re-using fastify's router, that stopped being a thing though -- a route has to be matched before it can be upgraded. If users want one handler to process all incoming websocket connections, they should use a fastify.get("/*", {websocket: true}, ...)
, so I think this can be removed.
Signed-off-by: Matteo Collina hello@matteocollina.com
Just so you know, the change in the test is unrelated. That test checked if we trying to connect to a known route, and
/echo/
was not registered, only/echo
was.Fixes #236. Fixes https://github.com/platformatic/platformatic/issues/575.
Checklist
npm run test
andnpm run benchmark