Skip to content
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

Exception ignored in: function BleakClientWinRT.connect.<locals>.max_pdu_size_changed_handler #1039

Closed
snowuyl opened this issue Sep 29, 2022 · 3 comments · Fixed by #1041
Closed
Labels
Backend: WinRT Issues or PRs relating to the WinRT backend bug Something isn't working

Comments

@snowuyl
Copy link

snowuyl commented Sep 29, 2022

  • bleak version: 0.17.0
  • Python version: 3.10.7
  • Operating System: Windows 10

Description

python3 main.py

Exception ignored in: <function BleakClientWinRT.connect.<locals>.max_pdu_size_changed_handler at 0x0000021B434DD6C0>
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\bleak\backends\winrt\client.py", line 282, in max_pdu_size_changed_handler
    logger.debug("max_pdu_size_changed_handler: %d", sender.max_pdu_size)
OSError: [WinError -2147417848]
@dlech dlech added Backend: WinRT Issues or PRs relating to the WinRT backend bug Something isn't working labels Sep 29, 2022
@dlech
Copy link
Collaborator

dlech commented Sep 29, 2022

Some interesting reading on the race condition that may contribute to this: https://devblogs.microsoft.com/oldnewthing/20190521-00/?p=102505

dlech added a commit that referenced this issue Sep 29, 2022
This catches a possible OSError when max_pdu_size_changed_handler
is called after the GATT session ends. It can safely be ignored.

Fixes #1039.
dlech added a commit that referenced this issue Sep 29, 2022
This catches a possible OSError when max_pdu_size_changed_handler
is called after the GATT session ends. It can safely be ignored.

Fixes #1039.
@snowuyl
Copy link
Author

snowuyl commented Sep 30, 2022

Which version of bleak solved this issue?

@dlech
Copy link
Collaborator

dlech commented Sep 30, 2022

Please refer to the changelog for status.

@dlech dlech mentioned this issue Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend: WinRT Issues or PRs relating to the WinRT backend bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants