Skip to content

Preload and keepalive: copy settings when config loads, delete sample files - #22

Merged
Abdullah-Masood-05 merged 1 commit into
Abdullah-Masood-05:prs/2.3.2from
alchemyyy:prs/2.3.2
Nov 28, 2026
Merged

Abdullah-Masood-05 merged 1 commit into
Abdullah-Masood-05:prs/2.3.2from
alchemyyy:prs/2.3.2

Conversation

@alchemyyy

Copy link
Copy Markdown

Follow-up to #19

  • The preload thread and Created() read Initializer::instance->cache, which a config reload deletes. Warm::ConfigLoaded() now copies preload.enabled, preload.types and keepalive on the loading thread, ConfigUnloaded() clears them, and Warm only reads that copy.
  • The preload deletes its sample. files and their folder in %TEMP% when it finishes.

…ete the sample files

- The preload thread and Created() read Initializer::instance->cache, which a config reload deletes. Warm::ConfigLoaded() now copies preload.enabled, preload.types and keepalive on the loading thread, ConfigUnloaded() clears them, and Warm only reads that copy.
- The preload deletes its sample.<ext> files and their folder in %TEMP% when it finishes.
@Abdullah-Masood-05
Abdullah-Masood-05 merged commit 8b2d1b0 into Abdullah-Masood-05:prs/2.3.2 Nov 28, 2026
1 check passed
Abdullah-Masood-05 added a commit that referenced this pull request Nov 28, 2026
…e copy their settings when the config loads, delete the sample files
Abdullah-Masood-05 added a commit that referenced this pull request Nov 28, 2026
@Abdullah-Masood-05

Copy link
Copy Markdown
Owner

Merged, thank you @alchemyyy! Copying the settings when the config loads is a clean way to close that race, and the sample files are cleaned up nicely.

I added one small commit on top (ff8ffdb). The preload now also takes the config file's path from that same copy, so it no longer reads application.Config, which the parser replaces on every reload. ConfigUnloaded only turns keepalive off when the load failed or Shell was disabled, so a normal reload no longer lets go of the held handlers for a moment.

It's in 2.3.2 beta 3, which is building now and should be out in about 20 minutes.

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.

2 participants