Skip to main content

Why does a Rust plugin run an action twice after reload?

Start with one harmless test event and count the effects. A duplicate can come from two tools reacting to one event, or from a single plugin's repeated work. Fresh-start and after-reload counts help you tell those cases apart.

Use one test input with a recognizable label

For example, a private test server sends a closing reminder twice after a reload. Keep the live channel disconnected. Use console output or a private destination and note the exact time each line appears. Review the plugin, optional framework modules and panel schedules for anything else configured to send the same reminder.

Change only one condition in each run

Use the same test delay or trigger each time. Reset the test before changing the set of tools.

Change only one condition in each run
ResultWhat to try next
Two reminders from the first fresh startOn the private copy, run one suspected sender at a time. Give each sender a distinctive message if its settings allow.
One after startup, two only after reloadRepeat a fresh start and a single reload with just that plugin active. If the duplicate returns, send the author the timeline and the exact reload sequence.
One immediate reminder and one later copyCompare their timing against ordinary scheduled jobs and any resend behavior the plugin documents.

Prove the count cleared

Check the first event after a cold start and another after one reload. The intended action should happen once in both runs. Oxide documents when plugins stop receiving their normal hooks on unload, and Carbon documents repeating timers as a separate mechanism. The logs can show the symptom. The plugin author can confirm why a particular registration or timer repeats.

Sources

Analytics settings

Analytics are off.

Help improve RustSC with page counts and performance measurements. Privacy details