Handle keep_open_until: cancel, periodic poll, thread safety #12

Open
mykhailo wants to merge 1 commits from mykhailo/godoor:issue-11-keep-open into master
First-time contributor

Closes #11

  • cancelKeepOpenDoor() closes the door when /allowed returns null (cancelled/expired holds now actually close)
  • background goroutine polls /allowed every 15s (tunable via KDOORPI_ALLOWED_POLL_INTERVAL)
  • keepDoorOpenLock mutex guards shared hold state
  • skip timer rebuild when the hold is unchanged (anti-thrash)

Files: godoor.go, keepopen.go.

Closes #11 - `cancelKeepOpenDoor()` closes the door when /allowed returns null (cancelled/expired holds now actually close) - background goroutine polls /allowed every 15s (tunable via `KDOORPI_ALLOWED_POLL_INTERVAL`) - `keepDoorOpenLock` mutex guards shared hold state - skip timer rebuild when the hold is unchanged (anti-thrash) Files: godoor.go, keepopen.go.
mykhailo added 1 commit 2026-06-17 13:54:16 +00:00
- cancelKeepOpenDoor() closes the door when /allowed returns null
- background goroutine polls /allowed every 15s (KDOORPI_ALLOWED_POLL_INTERVAL)
- keepDoorOpenLock mutex guards shared hold state
- skip timer rebuild when the hold is unchanged (anti-thrash)
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u issue-11-keep-open:mykhailo-issue-11-keep-open
git checkout mykhailo-issue-11-keep-open
Sign in to join this conversation.