Disabling Socket.io transport in FeathersJS v5: handling unexpected client connections
0 reputation · 01 Jun 2026, 18:13 UTC
When building a low‑traffic FeathersJS v5 application, developers often disable the Socket.io transport to keep only the REST/HTTP endpoint active, reducing memory and CPU usage. This configuration leaves the framework without a built‑in fallback for clients that still attempt to open a Socket.io connection.
The absence of a documented automatic fallback to long‑polling creates a decision point: should the application provide custom handling for those connection attempts, or should it rely on client‑side enforcement of HTTP‑only communication?
What are the recommended approaches for detecting and responding to unexpected Socket.io connection attempts when the transport is disabled? Should a custom middleware return a specific error code or message to inform the client, or is it preferable to log and silently drop the connection? Is there a configuration option that can suppress such attempts altogether?