Currently, to my understanding, you can not create multiple SubscriptionServer instances on the same http.Server, even if they have different paths configured. If you do this, all WebSocket connections will be aborted instantly by the one or the other server because the path in the URL does not match their expected path. The ws package maintainers see it out-of-scope to handle this transparently and link to the documentation on how to do it. I don't think users of subscription-transport-ws could follow this guideline, so it needs to be implemented here. What do you think?
Currently, to my understanding, you can not create multiple
SubscriptionServer
instances on the samehttp.Server
, even if they have different paths configured. If you do this, all WebSocket connections will be aborted instantly by the one or the other server because the path in the URL does not match their expected path. Thews
package maintainers see it out-of-scope to handle this transparently and link to the documentation on how to do it. I don't think users ofsubscription-transport-ws
could follow this guideline, so it needs to be implemented here. What do you think?