aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@yandex-team.ru>2022-02-10 16:50:29 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:29 +0300
commit172dad1c62209f2cfa9cb5ae4fe10a21ac1cfe61 (patch)
treead7889cb7c679ab33fe9634be1c264655006ba9b
parent27d9c978ef36b8d6a70f60a38957f25d75192f70 (diff)
downloadydb-172dad1c62209f2cfa9cb5ae4fe10a21ac1cfe61.tar.gz
Restoring authorship annotation for <damien@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--library/cpp/messagebus/locator.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/messagebus/locator.cpp b/library/cpp/messagebus/locator.cpp
index e38a35c426..3d752aeb3a 100644
--- a/library/cpp/messagebus/locator.cpp
+++ b/library/cpp/messagebus/locator.cpp
@@ -311,7 +311,7 @@ namespace NBus {
return port;
}
-
+
int TBusLocator::GetLocalAddresses(TBusService service, TVector<TNetAddr>& addrs) {
TGuard<TMutex> G(Lock);
TServiceId serviceId = GetServiceId(service);
@@ -322,19 +322,19 @@ namespace NBus {
if (item.ServiceId != serviceId) {
break;
}
-
+
if (IsLocal(item.Addr)) {
addrs.push_back(item.Addr);
}
}
-
+
if (addrs.size() == 0) {
return -1;
- }
-
+ }
+
return (int)addrs.size();
- }
-
+ }
+
int TBusLocator::LocateHost(TBusService service, TBusKey key, TString* host, int* port, bool* isLocal) {
int ret;
TNetAddr addr;
@@ -342,7 +342,7 @@ namespace NBus {
if (ret != 0) {
return ret;
}
-
+
{
TGuard<TMutex> G(Lock);
THostAddrMap::const_iterator it = HostAddrMap.find(addr);