summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vespalib/src/vespa/vespalib/portal/http_connection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/vespa/vespalib/portal/http_connection.cpp b/vespalib/src/vespa/vespalib/portal/http_connection.cpp
index fc9e8f200cc..26c784af028 100644
--- a/vespalib/src/vespa/vespalib/portal/http_connection.cpp
+++ b/vespalib/src/vespa/vespalib/portal/http_connection.cpp
@@ -158,7 +158,7 @@ HttpConnection::do_dispatch()
void
HttpConnection::do_wait()
{
- if (_reply_ready) {
+ if (_reply_ready.load(std::memory_order_acquire)) {
set_state(State::WRITE_REPLY, false, true);
}
}
@@ -248,8 +248,8 @@ HttpConnection::respond_with_content(const vespalib::string &content_type,
dst.printf("\r\n");
dst.write(content.data(), content.size());
}
- _reply_ready = true;
_token->update(false, true);
+ _reply_ready.store(true, std::memory_order_release);
}
void
@@ -261,8 +261,8 @@ HttpConnection::respond_with_error(int code, const vespalib::string &msg)
dst.printf("Connection: close\r\n");
dst.printf("\r\n");
}
- _reply_ready = true;
_token->update(false, true);
+ _reply_ready.store(true, std::memory_order_release);
}
} // namespace vespalib::portal