diff options
| author | nohttp <[email protected]> | 2022-02-10 16:50:31 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:31 +0300 |
| commit | dbdd851418e92f8821ee1b1041352d66e3bde170 (patch) | |
| tree | c51433a8aa6b29260a3fbf22c9e9272b2c792c83 /library/cpp/messagebus/remote_client_connection.cpp | |
| parent | 8de5e9fef85b2ab655e3bc1d77ee2674f417cd15 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/remote_client_connection.cpp')
| -rw-r--r-- | library/cpp/messagebus/remote_client_connection.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/messagebus/remote_client_connection.cpp b/library/cpp/messagebus/remote_client_connection.cpp index 8c7a6db3a8c..977f53af7d8 100644 --- a/library/cpp/messagebus/remote_client_connection.cpp +++ b/library/cpp/messagebus/remote_client_connection.cpp @@ -67,7 +67,7 @@ void TRemoteClientConnection::TryConnect() { if (!WriterData.Channel) { if ((now - LastConnectAttempt) < TDuration::MilliSeconds(Config.RetryInterval)) { - DropEnqueuedData(MESSAGE_CONNECT_FAILED, MESSAGE_CONNECT_FAILED); + DropEnqueuedData(MESSAGE_CONNECT_FAILED, MESSAGE_CONNECT_FAILED); return; } LastConnectAttempt = now; @@ -77,11 +77,11 @@ void TRemoteClientConnection::TryConnect() { } if (BeforeSendQueue.IsEmpty() && WriterData.SendQueue.Empty() && !Config.ReconnectWhenIdle) { - // TryConnect is called from Writer::Act, which is called in cycle - // from session's ScheduleTimeoutMessages via Cron. This prevent these excessive connects. - return; - } - + // TryConnect is called from Writer::Act, which is called in cycle + // from session's ScheduleTimeoutMessages via Cron. This prevent these excessive connects. + return; + } + ++WriterData.Status.ConnectSyscalls; int ret = connect(WriterData.Channel->GetSocket(), PeerAddr.Addr(), PeerAddr.Len()); @@ -113,7 +113,7 @@ void TRemoteClientConnection::TryConnect() { WriterData.Status.Connected = false; WriterData.Status.ConnectError = err; - DropEnqueuedData(MESSAGE_CONNECT_FAILED, MESSAGE_CONNECT_FAILED); + DropEnqueuedData(MESSAGE_CONNECT_FAILED, MESSAGE_CONNECT_FAILED); } } } |
