Skip to content

Fix repeating-timer leak in parachute delete polling#92

Open
Smiggus wants to merge 1 commit into
7Cav:mainfrom
Smiggus:fix/parachute-delete-poll-timer-leak
Open

Fix repeating-timer leak in parachute delete polling#92
Smiggus wants to merge 1 commit into
7Cav:mainfrom
Smiggus:fix/parachute-delete-poll-timer-leak

Conversation

@Smiggus

@Smiggus Smiggus commented Jul 4, 2026

Copy link
Copy Markdown

ScheduleChuteDeleteWithPolling and PollUntilEmptyThenDeleteChute pass repeat = true to CallLater while also manually rescheduling the poll with retryCount + 1. Every parachute exit therefore registers a repeating 200 ms timer that is never removed, and each poll iteration registers another one. The repeating instances fire with a stale retryCount, so they never hit the max-retries exit and keep invoking the poll for the rest of the server session. Timer count grows with every jump.

Practical effect: gradually increasing script load and degrading server performance over mission time, worst during and after airborne operations with many jumpers.

The retryCount design is a one-shot rescheduling loop, so this passes repeat = false in both places. Poll cadence (200 ms), retry cap (20), and delete behavior are unchanged.

Testing suggestion: on a test server, run 20 or more parachute jumps, then compare script profiler / frame time against current main. On main the poll function keeps firing after all chutes are gone; with this fix it stops.

ScheduleChuteDeleteWithPolling and PollUntilEmptyThenDeleteChute passed
repeat=true to CallLater while also manually rescheduling the poll with
retryCount + 1. Every parachute exit therefore registered a repeating
200 ms timer that is never removed, and each poll iteration registered
another one. The repeating instances fire with a stale retryCount so they
never hit the max-retries exit; they keep invoking the poll for the rest
of the server session. Timer count grows with every jump, degrading
server performance over mission time.

The retryCount design is a one-shot rescheduling loop, so pass
repeat=false in both places. Poll cadence and delete behavior are
unchanged.

Symptoms this should address: gradually increasing server frame time and
script load during and after airborne operations.
@Smiggus Smiggus force-pushed the fix/parachute-delete-poll-timer-leak branch from 227ab11 to 9959bd2 Compare July 7, 2026 17:33
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.

1 participant