Skip to content

Commit

Permalink
Merge pull request #112 from joesturge/error-handling
Browse files Browse the repository at this point in the history
fix: dont park thread when error occurs
  • Loading branch information
joesturge authored Sep 19, 2024
2 parents ba03563 + b2ddaa8 commit dcb47ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Error handling no longer pauses logging thread, just sets unhealthy

### Security

- Dependabot updates

## [2.5.1] - 2024-09-03

### Security
Expand Down
6 changes: 1 addition & 5 deletions src/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ pub fn healthy() {

pub fn unhealthy() {
set(Status::UNHEALTHY);
error!(target: "lazymc-docker-proxy::health", "Error detected. Pausing application...");
// wait indefinitely
loop {
std::thread::park();
}
error!(target: "lazymc-docker-proxy::health", "Application is unhealthy.");
}

pub fn run() {
Expand Down

0 comments on commit dcb47ac

Please sign in to comment.