diff options
| author | antervis <[email protected]> | 2022-02-10 16:49:48 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:48 +0300 | 
| commit | b3eef5b52437f05851a3e8fb489a68db0132657b (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/messagebus | |
| parent | 0942f9eeaefcfc84db83fa240d8ed52b99345e7d (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus')
| -rw-r--r-- | library/cpp/messagebus/messqueue.cpp | 50 | 
1 files changed, 25 insertions, 25 deletions
| diff --git a/library/cpp/messagebus/messqueue.cpp b/library/cpp/messagebus/messqueue.cpp index c956d4a4732..3474d62705f 100644 --- a/library/cpp/messagebus/messqueue.cpp +++ b/library/cpp/messagebus/messqueue.cpp @@ -131,34 +131,34 @@ TBusClientSessionPtr TBusMessageQueue::CreateSource(TBusProtocol* proto, IBusCli  }  TBusServerSessionPtr TBusMessageQueue::CreateDestination(TBusProtocol* proto, IBusServerHandler* handler, const TBusClientSessionConfig& config, const TString& name) { -    TRemoteServerSessionPtr session(new TRemoteServerSession(this, proto, handler, config, name));  -    try {  -        int port = config.ListenPort;  -        if (port == 0) {  -            port = Locator->GetLocalPort(proto->GetService());  -        }  -        if (port == 0) {  -            port = proto->GetPort();  -        }  - -        session->Listen(port, this);  -  -        Add(session.Get());  -        return session.Release();  -    } catch (...) {  -        Y_FAIL("create destination failure: %s", CurrentExceptionMessage().c_str());  -    }  +    TRemoteServerSessionPtr session(new TRemoteServerSession(this, proto, handler, config, name)); +    try { +        int port = config.ListenPort; +        if (port == 0) { +            port = Locator->GetLocalPort(proto->GetService()); +        } +        if (port == 0) { +            port = proto->GetPort(); +        } + +        session->Listen(port, this); + +        Add(session.Get()); +        return session.Release(); +    } catch (...) { +        Y_FAIL("create destination failure: %s", CurrentExceptionMessage().c_str()); +    }  }  TBusServerSessionPtr TBusMessageQueue::CreateDestination(TBusProtocol* proto, IBusServerHandler* handler, const TBusServerSessionConfig& config, const TVector<TBindResult>& bindTo, const TString& name) { -    TRemoteServerSessionPtr session(new TRemoteServerSession(this, proto, handler, config, name));  -    try {  -        session->Listen(bindTo, this);  -        Add(session.Get());  -        return session.Release();  -    } catch (...) {  -        Y_FAIL("create destination failure: %s", CurrentExceptionMessage().c_str());  -    }  +    TRemoteServerSessionPtr session(new TRemoteServerSession(this, proto, handler, config, name)); +    try { +        session->Listen(bindTo, this); +        Add(session.Get()); +        return session.Release(); +    } catch (...) { +        Y_FAIL("create destination failure: %s", CurrentExceptionMessage().c_str()); +    }  }  void TBusMessageQueue::Add(TIntrusivePtr<TBusSessionImpl> session) { | 
