-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Python 3.6 does not support asyncio.get_event_loop().add_signal_handler and async_client.py spams about it on every connect attempt #276
Comments
Yes, your suggestion makes sense. Thanks. If you create the PR I'll review and merge. |
The same problem with Python 3.10 @ Windows and I'm not sure why. Maybe it's a asyncio bug on Windows. |
@bialix I believe there is no support for signal handlers in the Windows event loop, so there is currently no way to exit cleanly on that platform. |
Yep, I think you're right. So, should I compose a patch or you do it yourself? |
OK, that's definitely problem with your signal_handler. |
I'm going to close this issue, since you have now moved the discussion to #277. |
#277 is about disconnect method. This issue is about spaming with warnings. I don't understand, but it's up to you to close issues, that's your project. |
I settled the discussion on the multiple attempts to set a signal in the 2nd message in this issue:
Everything else in this issue is unrelated to that problem. In any case, I just submitted the fix for the original issue you reported here. Now the signal will be set the first time you connect only. |
engineio/asyncio_client.py
has the following code at the very start ofconnect
:The problem here is that variable
async_signal_handler_set
will never be set to True in this case and logger is spamming my logs with useless warning.May I suggest to rename
async_signal_handler_set
toasync_signal_handler_once
and set it regardless of exception raised to avoid it triggered next time? I can make PR if you agree.The text was updated successfully, but these errors were encountered: