diff options
author | nohttp <nohttp@yandex-team.ru> | 2022-02-10 16:50:31 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:31 +0300 |
commit | b1683877992937b1040baa621c4b216ed8405729 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/messagebus/remote_client_connection.cpp | |
parent | dbdd851418e92f8821ee1b1041352d66e3bde170 (diff) | |
download | ydb-b1683877992937b1040baa621c4b216ed8405729.tar.gz |
Restoring authorship annotation for <nohttp@yandex-team.ru>. Commit 2 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 977f53af7d..8c7a6db3a8 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); } } } |