-
-
Notifications
You must be signed in to change notification settings - Fork 895
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
fix test_client connected error #1829
Conversation
The server disconnects all clients, only one testclient will disconnect.
When disconnecting, messages before disconnection can not received.
I don't understand what is the issue that this change addresses. Can you provide an example please? |
I add an example in test. |
Codecov Report
@@ Coverage Diff @@
## main #1829 +/- ##
==========================================
- Coverage 79.24% 78.64% -0.60%
==========================================
Files 3 3
Lines 371 370 -1
Branches 73 72 -1
==========================================
- Hits 294 291 -3
- Misses 56 59 +3
+ Partials 21 20 -1
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
@@ -237,7 +237,7 @@ def on_json(self, data): | |||
return data | |||
|
|||
def on_exit(self, data): | |||
disconnect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change seems unrelated
@@ -203,8 +204,6 @@ def get_received(self, namespace=None): | |||
namespace is assumed if this argument is not | |||
provided. | |||
""" | |||
if not self.is_connected(namespace): | |||
raise RuntimeError('not connected') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
Thanks, I do understand the problem now. I have addressed in a slightly different way. |
The server disconnects all clients, only one testclient will disconnect.