Skip to content

Fix: Implement proper state management in MonitorService #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shaykeren
Copy link

This PR fixes the MonitorService implementation by properly managing service state and removing deliberate exception throwing.

Changes made:

  1. Added AtomicBoolean for thread-safe state management
  2. Removed deliberate exception throwing
  3. Added proper state transition logging
  4. Implemented proper error handling in monitor() method

The new implementation:

  • Uses AtomicBoolean for thread-safe state management
  • Properly handles service state transitions
  • Includes comprehensive logging
  • Has proper error handling in the monitor() method
  • Maintains a health status indicator

This fixes the recurring IllegalStateException issue (Error ID: d98aea10-5f5e-11f0-b569-0242ac160009) by implementing proper state management instead of throwing exceptions.

- Added AtomicBoolean for thread-safe state management
- Removed deliberate exception throwing
- Added proper state transition logging
- Implemented proper error handling in monitor() method
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