Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
danovaro committed Sep 30, 2024
1 parent 27ad205 commit 2d3ce4d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/fdb5/remote/server/ServerConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,6 @@ void ServerConnection::initialiseConnections() {
dataEndpoint = eckit::net::Endpoint{endpointFromClient.hostname(), dataSocket_->localPort()};
}

std::future<void> dataSocketInitFuture_;
if (!single_) {
dataSocketInitFuture_ = std::async(std::launch::async, [this] {
dataSocket_->accept();
});
}
eckit::Log::info() << "Sending data endpoint to client: " << dataEndpoint << std::endl;
{
eckit::Buffer startupBuffer(1024);
Expand All @@ -261,8 +255,8 @@ void ServerConnection::initialiseConnections() {
write(Message::Startup, true, 0, 0, std::vector<std::pair<const void*, uint32_t>>{{startupBuffer.data(), s.position()}});
}

if (!single_ && dataSocketInitFuture_.valid()) {
dataSocketInitFuture_.wait();
if (!single_) {
dataSocket_->accept();

// Check the response from the client.
// Ensure that the hostname matches the original hostname, and that
Expand Down

0 comments on commit 2d3ce4d

Please sign in to comment.