diff options
author | alexvru <alexvru@ydb.tech> | 2022-07-12 14:11:16 +0300 |
---|---|---|
committer | alexvru <alexvru@ydb.tech> | 2022-07-12 14:11:16 +0300 |
commit | 35e37a299dd35361ded9582e41f4c243af5ffc77 (patch) | |
tree | b13268223b56d52401879eb73c1102b3d12327c8 | |
parent | e2a6f2c26d958d2e174489cff6e6d19e9814aa4c (diff) | |
download | ydb-35e37a299dd35361ded9582e41f4c243af5ffc77.tar.gz |
Fix early poller registration bug
-rw-r--r-- | library/cpp/actors/interconnect/interconnect_handshake.cpp | 7 |
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 aaa8440d72..d7f657299e 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() { |