fix: track and clean up spawned processes, timers, and connections#9
Open
fix: track and clean up spawned processes, timers, and connections#9
Conversation
- NetworkService: track IP check interval and spawned bash processes, add OnApplicationShutdown to clear interval and kill processes, kill monitor on error/stderr, remove process.on(SIGTERM) handler - Throttle: store setInterval ID, add destroy() method to clear it - RconService: only store connection after successful auth, add timeout to rcon.send() calls, clear connection timer after successful connect - RedisManagerService: track health check intervals, add OnApplicationShutdown to clear intervals and disconnect
lukepolo
reviewed
Apr 9, 2026
| port: matchData.server_port, | ||
| password: matchData.id, | ||
| }); | ||
|
|
Contributor
There was a problem hiding this comment.
you did this in another MR
Contributor
Author
There was a problem hiding this comment.
Reverted all RCON changes from this PR -- rcon.service.ts is back to main. Those changes are handled in the error-handling PR instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OnApplicationShutdownto clear interval and kill all processes; kill monitor process on error/stderr handlers before rejecting; removeprocess.on(SIGTERM)handler (cleanup now handled by lifecycle hook)setIntervalID as a class property; adddestroy()method that callsclearIntervalnullon failure instead of storing a broken connection); add 5s timeout torcon.send()calls; clear the connection timeout timer after successful connectsetIntervalIDs in an array; addOnApplicationShutdownto clear all intervals and disconnect all Redis connectionsCloses 5stackgg/5stack-panel#407
Closes 5stackgg/5stack-panel#408
Test plan
npm run buildpasses with no errors