-
-
Notifications
You must be signed in to change notification settings - Fork 894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot associate a SocketIO instance with more than one application #146
Comments
Hmm. Let me think about this, it's tricky. Normally, extensions get the app from the app context, but with sockets there is no HTTP request, so no context either. Storing the app is a simple (and lazy, why not admit it) solution that works well, but creates this limitation. |
Sure I imagine it's not straightforward. But it's hard to work around because the SocketIO instance serves two purposes - (a) to provide the declarative syntax to define handlers (common to all app instances) and (b) to actually do the work (specific to a single app instance). I am obviously not super-acquainted with your code but I guess the two things could be somehow separated, e.g. the SocketIO instance takes care of (a) then init_app creates some internal object to do (b) behind the scenes. |
@ericremoreynolds could you please try release 1.0b2? I think you will be able to work with multiple app instances with this version. Thanks! |
Looks good! Works with our code. Thanks. |
Hi Miguel,
While you work on the other issue I posted here is another question for you.
Are you planning on keeping this limitation or will v1 support multiple apps in future?
In our case this is creating a problem because our tests are failing since each one instantiates a new app.
Kind regards,
Eric
The text was updated successfully, but these errors were encountered: