diff --git a/flow/Knobs.cpp b/flow/Knobs.cpp index 7dd802e0d6..c2a478e7f9 100644 --- a/flow/Knobs.cpp +++ b/flow/Knobs.cpp @@ -67,7 +67,6 @@ FlowKnobs::FlowKnobs(bool randomize, bool isSimulated) { init( MAX_RECONNECTION_TIME, 0.5 ); init( RECONNECTION_TIME_GROWTH_RATE, 1.2 ); init( RECONNECTION_RESET_TIME, 5.0 ); - init( CONNECTION_ACCEPT_DELAY, 0.5 ); init( USE_OBJECT_SERIALIZER, 1 ); init( TOO_MANY_CONNECTIONS_CLOSED_RESET_DELAY, 5.0 ); init( TOO_MANY_CONNECTIONS_CLOSED_TIMEOUT, 20.0 ); diff --git a/flow/Knobs.h b/flow/Knobs.h index fc72b3cf44..6ecf1c8759 100644 --- a/flow/Knobs.h +++ b/flow/Knobs.h @@ -87,7 +87,6 @@ public: double MAX_RECONNECTION_TIME; double RECONNECTION_TIME_GROWTH_RATE; double RECONNECTION_RESET_TIME; - double CONNECTION_ACCEPT_DELAY; int USE_OBJECT_SERIALIZER; int TLS_CERT_REFRESH_DELAY_SECONDS; diff --git a/flow/Net2.actor.cpp b/flow/Net2.actor.cpp index 4fdc769b76..a476ed2352 100644 --- a/flow/Net2.actor.cpp +++ b/flow/Net2.actor.cpp @@ -569,7 +569,7 @@ public: auto onHandshook = p.getFuture(); self->getSSLSocket().async_handshake( boost::asio::ssl::stream_base::server, std::move(p) ); wait( onHandshook ); - wait(delay(0) || delay(FLOW_KNOBS->CONNECTION_ACCEPT_DELAY, TaskPriority::WriteSocket)); + wait(delay(0, TaskPriority::Handshake)); connected.send(Void()); } catch (...) { auto iter(g_network->networkInfo.serverTLSConnectionThrottler.find(peerIP)); @@ -609,7 +609,7 @@ public: Future onHandshook = p.getFuture(); self->ssl_sock.async_handshake( boost::asio::ssl::stream_base::client, std::move(p) ); wait( onHandshook ); - wait(delay(0) || delay(FLOW_KNOBS->CONNECTION_ACCEPT_DELAY, TaskPriority::WriteSocket)); + wait(delay(0, TaskPriority::Handshake)); connected.send(Void()); } catch (...) { std::pair peerIP = std::make_pair(self->peer_address.ip, self->peer_address.port); diff --git a/flow/network.h b/flow/network.h index 555203f88d..cd61040b51 100644 --- a/flow/network.h +++ b/flow/network.h @@ -44,6 +44,7 @@ enum class TaskPriority { DiskIOComplete = 9150, LoadBalancedEndpoint = 9000, ReadSocket = 9000, + Handshake = 8900, CoordinationReply = 8810, Coordination = 8800, FailureMonitor = 8700,