summaryrefslogtreecommitdiffstats
path: root/src/shrpx_worker.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:46:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-11 16:46:30 +0000
commit8e1187a02b785e56d798660a9a292ca385e1f6aa (patch)
treeb035593aa2ae37c25aeb28b537a3223c52532ab1 /src/shrpx_worker.h
parentAdding upstream version 1.61.0. (diff)
downloadnghttp2-upstream.tar.xz
nghttp2-upstream.zip
Adding upstream version 1.62.1.upstream/1.62.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_worker.h')
-rw-r--r--src/shrpx_worker.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/shrpx_worker.h b/src/shrpx_worker.h
index f8a2d84..346e764 100644
--- a/src/shrpx_worker.h
+++ b/src/shrpx_worker.h
@@ -265,12 +265,12 @@ struct WorkerStat {
struct QUICPacket {
QUICPacket(size_t upstream_addr_index, const Address &remote_addr,
const Address &local_addr, const ngtcp2_pkt_info &pi,
- const uint8_t *data, size_t datalen)
+ std::span<const uint8_t> data)
: upstream_addr_index{upstream_addr_index},
remote_addr{remote_addr},
local_addr{local_addr},
pi{pi},
- data{data, data + datalen} {}
+ data{std::begin(data), std::end(data)} {}
QUICPacket() : upstream_addr_index{}, remote_addr{}, local_addr{}, pi{} {}
size_t upstream_addr_index;
Address remote_addr;
@@ -439,10 +439,12 @@ private:
QUICConnectionHandler quic_conn_handler_;
#endif // ENABLE_HTTP3
-#ifndef HAVE_ATOMIC_STD_SHARED_PTR
+#ifdef HAVE_ATOMIC_STD_SHARED_PTR
+ std::atomic<std::shared_ptr<TicketKeys>> ticket_keys_;
+#else // !HAVE_ATOMIC_STD_SHARED_PTR
std::mutex ticket_keys_m_;
-#endif // !HAVE_ATOMIC_STD_SHARED_PTR
std::shared_ptr<TicketKeys> ticket_keys_;
+#endif // !HAVE_ATOMIC_STD_SHARED_PTR
std::vector<std::shared_ptr<DownstreamAddrGroup>> downstream_addr_groups_;
// Worker level blocker for downstream connection. For example,
// this is used when file descriptor is exhausted.