-
Notifications
You must be signed in to change notification settings - Fork 32
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
Reopening BlitzGateway returns False #413
Comments
Hi, thanks for the report. And also check that your proposed changes doesn't break the behaviour e.g. with the tests at #400 (review) Please feel free to open a PR with your proposed change and then we can continue the discussion there (since it will be tested by ci jobs etc). |
The exception looks a little different now, but sadly still failing to reconnect:
I'll get working on a PR |
Thanks for the scenario @barrettMCW. Having reviewed the current implementation, probably the outstanding question is whether a Assuming the latter is the expectation, the
|
Thanks for reviewing this @sbesson! The cloning method fixes my issues. From a pure semantic view, it makes sense to me that a gateway would open and close multiple times. But requiring a clone seems like a perfectly valid mechanism. |
@will-moore @jburel what is your position on the reconnection scenario? |
I don't have a strong opinion on whether we should support |
Most usage of the gateway in code or example assume that the services will be shut down when the gateway is closed. |
Works for me! I'll open a new issue for documenting the solution as described here. Thanks y'all! |
When I close the BlitzGateway then reopen it, it fails to connect, I think it's trying to reuse the client object which is attached to a closed session. I fixed it by doing:
This is called in a thread, so there might be some extra weirdness involved in causing this bug.
Would there be any issues with adding the conn._resetOmeroClient method in conn.close?
I can provide the full code I'm using to cause this bug if you want to attempt to replicate this, it's a relatively small class.
The text was updated successfully, but these errors were encountered: