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

check is_connected in loop() #174

Merged
merged 4 commits into from
Nov 20, 2023
Merged

Conversation

vladak
Copy link
Contributor

@vladak vladak commented Aug 25, 2023

Someone hit a None-deref when calling loop() without calling connect() first. This change checks the connected status in loop() and raises exception if not connected.

Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, and looks good to me. Thanks for tracking it down and adding the check @vladak!

I did a quick test of an example script on a Fun House and it's working as expected. I also confirmed calling loop() before connect() results in the exception being raised.

@FoamyGuy FoamyGuy merged commit 1c25441 into adafruit:main Nov 20, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants