summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fnet/src/vespa/fnet/connection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fnet/src/vespa/fnet/connection.cpp b/fnet/src/vespa/fnet/connection.cpp
index bf29cc29c18..5f7adb32af0 100644
--- a/fnet/src/vespa/fnet/connection.cpp
+++ b/fnet/src/vespa/fnet/connection.cpp
@@ -491,7 +491,7 @@ FNET_Connection::FNET_Connection(FNET_TransportThread *owner,
_cleanup(nullptr)
{
assert(_socket && (_socket->get_fd() >= 0));
- ++_num_connections;
+ _num_connections.fetch_add(1, std::memory_order_relaxed);
}
@@ -529,7 +529,7 @@ FNET_Connection::FNET_Connection(FNET_TransportThread *owner,
_adminChannel = admin.get();
_channels.Register(admin.release());
}
- ++_num_connections;
+ _num_connections.fetch_add(1, std::memory_order_relaxed);
}
@@ -540,7 +540,7 @@ FNET_Connection::~FNET_Connection()
delete _adminChannel;
}
assert(_cleanup == nullptr);
- --_num_connections;
+ _num_connections.fetch_sub(1, std::memory_order_relaxed);
}