Skip to content

sonos: fix infinite recursive reconnect tasks #2232

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

Merged
merged 1 commit into from
Jul 3, 2025

Conversation

NoahCornell
Copy link
Contributor

@NoahCornell NoahCornell commented Jul 1, 2025

Check all that apply

Type of Change

  • WWST Certification Request
    • If this is your first time contributing code:
      • I have reviewed the README.md file
      • I have reviewed the CODE_OF_CONDUCT.md file
      • I have signed the CLA
    • I plan on entering a WWST Certification Request or have entered a request through the WWST Certification console at developer.smartthings.com
  • Bug fix
  • New feature
  • Refactor

Checklist

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have verified my changes by testing with a device or have communicated a plan for testing
  • I am adding new behavior, such as adding a sub-driver, and have added and run new unit tests to cover the new behavior

Description of Change

There was a case where we would call the spawn reconnect task each time we tried to call start on the connection. This adds a boolean on the connection to track whether there is a reconnect task currently spawned. It uses a bool instead of a handle returned by the spawned task to account for hubs on older firmware.

Summary of Completed Tests

Reproducible by unplugging sonos speaker. Tested that this change only spawns one task and is able to reconnect when plugged back in.

@NoahCornell NoahCornell requested review from varzac, dljsjr and cjswedes July 1, 2025 20:58
Copy link

github-actions bot commented Jul 1, 2025

Channel deleted.

Copy link

github-actions bot commented Jul 1, 2025

Test Results

   67 files  ±0    443 suites  ±0   0s ⏱️ ±0s
2 264 tests ±0  2 264 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 862 runs  ±0  3 862 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 860f43a. ± Comparison against base commit 7c43811.

Copy link

github-actions bot commented Jul 1, 2025

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 860f43a

@NoahCornell NoahCornell merged commit 3d05462 into main Jul 3, 2025
11 checks passed
@NoahCornell NoahCornell deleted the bugfix/sonos-reconnect-loop branch July 3, 2025 14:53
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.

4 participants