-
Notifications
You must be signed in to change notification settings - Fork 772
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
component.stop() should not return session.leave() result (if session exists) #1075
Conversation
…uture (not return session.leave() result)
Codecov Report
@@ Coverage Diff @@
## master #1075 +/- ##
=======================================
Coverage 41.55% 41.55%
=======================================
Files 69 69
Lines 13197 13197
Branches 2205 2205
=======================================
Hits 5484 5484
Misses 7293 7293
Partials 420 420
Continue to review full report at Codecov.
|
actually, looks good and merging (as I am pushing a release) -- |
I don't understand what problem you're trying to solve here? |
(If you do care about waiting for the disconnect to actually happen there won't be any way to do that now) |
@meejah uups, yes, right .. we do want to return the deferred from leave. lack of sleep, too much hurry;) |
In a scenario where I call "component.start(loop)" after a "component.stop()" with autobahn v18.9.2 an application is able to reconnect. Through the latest version (18.10.1) where the component.py has been updated (in particular, _start() and stop() methods) this application is not able to reconnect to Crossbar. In particular, the attribute "self._done_f" in "_start(...)" method is not reset to "None". I tried also another workaround: in stop() method I set "self._done_f" to "None" before the "return self._session.leave()". So this could be another solution. |
|
Yes, I was wrong about future object return. Maybe the problem, that I described in the previous post, is related to the "self._done_f" attribute that is not set to "None" in stop() method. |
Maybe, I'm not sure I ever anticipated someone calling |
Yes of course. I used in my code the start() method (not _start()). In autobahn 18.9.2 if I call and then call my application was able to reconnect to Crossbar again. |
(And yes, it's probably more-correct to reset So essentially you have a reason to want to disconnect your |
It should be fine to reset _done_f to None
Yes, I need to disconnect my application and reconnect it. Resetting the |
I think the correct fix is probably for
|
Exactly that is my workflow.
I agree! Should the |
Probably what should be done is anywhere we |
Moving to a ticket: #1077 |
18.11.2: fix: asyncio unregisterProducer raises exception fix: URL is not required in RawSocket configuration items with WAMP component API fix: revert crossbario/autobahn-python#1075
In component.py the stop() should do session.leave() and return the a future object if session exists (not return session.leave() result only).
Otherwise we are not able to call again the component.start(...) method after stop() method called.