Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

fix(zones/shared): ensure safe removal of zones from entering and exiting lists #749

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toshko003
Copy link

Description:
This PR addresses edge case issues with zone handling when entering and exiting multiple zones simultaneously. The changes focus on ensuring proper index validation before attempting to remove entries from the zone arrays.

Changes:

  • Added validation for exitingIndex before attempting to remove zones from the exitingZones array
  • Added validation for enteringIndex before attempting to remove zones from the enteringZones array
  • Fixed potential errors when a zone is being removed while it's being processed for entering or exiting

Impact:
This fix resolves issues that could occur in scenarios such as:

  • Entering or exiting multiple zones at the same time
  • Removing a zone while it's being processed for entering/exiting events
  • Edge cases where the zone's index might not exist in the respective arrays

These improvements ensure more stable behavior of the zone system, especially in complex environments with many overlapping zones or when zones are being dynamically created and destroyed.

totally not ai generated description

@Ehbw Ehbw self-assigned this Apr 27, 2025
@Ehbw Ehbw removed their assignment May 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants