summaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect/interconnect_handshake.cpp
diff options
context:
space:
mode:
authorDaniil Cherednik <[email protected]>2022-09-21 20:17:38 +0300
committerDaniil Cherednik <[email protected]>2022-09-21 20:17:38 +0300
commite6c9b17192c56494adba359d5e132c431b241191 (patch)
tree6f2449871a118a0e8919ce842b1174e06cb470ef /library/cpp/actors/interconnect/interconnect_handshake.cpp
parent285021ab1aac39e84b269d9bacd4deee69cf63fc (diff)
Ydb stable 22-4-2122.4.21
x-stable-origin-commit: e89099581237299a132feafb5b58af59ebd0468a
Diffstat (limited to 'library/cpp/actors/interconnect/interconnect_handshake.cpp')
-rw-r--r--library/cpp/actors/interconnect/interconnect_handshake.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/cpp/actors/interconnect/interconnect_handshake.cpp b/library/cpp/actors/interconnect/interconnect_handshake.cpp
index aaa8440d720..d7f657299ef 100644
--- a/library/cpp/actors/interconnect/interconnect_handshake.cpp
+++ b/library/cpp/actors/interconnect/interconnect_handshake.cpp
@@ -551,6 +551,7 @@ namespace NActors {
// set up incoming socket
SetupSocket();
+ RegisterInPoller();
// wait for initial request packet
TInitialPacket request;
@@ -878,8 +879,11 @@ namespace NActors {
// start connecting
err = -Socket->Connect(address);
if (err == EINPROGRESS) {
+ RegisterInPoller();
WaitPoller(false, true, "WaitConnect");
err = Socket->GetConnectStatus();
+ } else if (!err) {
+ RegisterInPoller();
}
// check if connection succeeded
@@ -915,9 +919,6 @@ namespace NActors {
// setup send buffer size
Socket->SetSendBufferSize(Common->Settings.GetSendBufferSize());
-
- // register in poller
- RegisterInPoller();
}
void RegisterInPoller() {