bynk.deploy.multiple_websocket_members
Error More than one member of a [deploy.workers.<key>] group declares a from websocket service; an upgrade request names no path or service a group could route it by, so a group has at most one such member, which takes every upgrade request whatever the path.
A WebSocket upgrade request names no service, and a from websocket service has no path of its own, so a Worker hands every upgrade to its one WebSocket service. A [deploy.workers.<key>] group folds its members into one Worker, so at most one member may declare a from websocket service, and that one takes every upgrade, whatever its path. Put the contexts in different groups, or leave one in no group so that it is a Worker of its own. Within one context, a second WebSocket service is bynk.service.websocket_multiple.
Example
[deploy.workers.live]contexts = ["live.chat", "live.scores"]
// live/chat.bynkservice chat from websocket(in: Frame, out: Frame) { … }
// live/scores.bynkcontext live.scores // ✗ the second member of `live` with a WebSocket serviceservice scores from websocket(in: Frame, out: Frame) { … }
// bynk.tomlcontexts = ["live.chat"] // ✓ `live.scores` is a Worker of its ownIn the Book
See also
- Every code in its category, Deployment, on the diagnostic index.
bynk explain bynk.deploy.multiple_websocket_membersshows the same from the installed toolchain, without a network.