aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/net/simple_health_producer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib/src/vespa/vespalib/net/simple_health_producer.cpp')
-rw-r--r--staging_vespalib/src/vespa/vespalib/net/simple_health_producer.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/net/simple_health_producer.cpp b/staging_vespalib/src/vespa/vespalib/net/simple_health_producer.cpp
index 651dab97e68..a25888399c1 100644
--- a/staging_vespalib/src/vespa/vespalib/net/simple_health_producer.cpp
+++ b/staging_vespalib/src/vespa/vespalib/net/simple_health_producer.cpp
@@ -4,7 +4,6 @@
#include <vespa/defaults.h>
#include <fcntl.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <unistd.h>
namespace {
@@ -51,28 +50,26 @@ SimpleHealthProducer::SimpleHealthProducer()
setOk();
}
-SimpleHealthProducer::~SimpleHealthProducer()
-{
-}
+SimpleHealthProducer::~SimpleHealthProducer() = default;
void
SimpleHealthProducer::setOk()
{
- LockGuard guard(_lock);
+ std::lock_guard guard(_lock);
_health = Health(true, "All OK");
}
void
SimpleHealthProducer::setFailed(const vespalib::string &msg)
{
- LockGuard guard(_lock);
+ std::lock_guard guard(_lock);
_health = Health(false, msg);
}
HealthProducer::Health
SimpleHealthProducer::getHealth() const
{
- LockGuard guard(_lock);
+ std::lock_guard guard(_lock);
if (_health.ok && diskFailed()) {
return Health(false, "disk ping failed");
}