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

Guard against a nil table lookup at cleanup. #939

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

dljsjr
Copy link
Contributor

@dljsjr dljsjr commented Aug 30, 2023

No description provided.

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

Channel deleted.

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

Test Results

     52 files     338 suites   0s ⏱️
1 602 tests 1 602 ✔️ 0 💤 0
2 763 runs  2 763 ✔️ 0 💤 0

Results for commit 7859188.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 7859188

@@ -249,7 +249,7 @@ function SonosWebSocketRouter.close_socket_for_player(target)
if ws ~= nil then
local ws_id = ws.id
table.insert(pending_close, target)
for _, uuid in ipairs(listener_ids_for_socket[ws_id]) do
for _, uuid in ipairs((listener_ids_for_socket[ws_id] or {})) do
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: unnecessary parentheses

@dljsjr dljsjr force-pushed the fix/nil-crash-in-cleanup-routine branch from ea601a6 to 7859188 Compare September 5, 2023 16:45
@dljsjr dljsjr merged commit fdb243a into main Sep 5, 2023
10 checks passed
@dljsjr dljsjr deleted the fix/nil-crash-in-cleanup-routine branch September 5, 2023 17:59
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