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 | 0942f9eeaefcfc84db83fa240d8ed52b99345e7d (patch) | |
| tree | 59616090b13df8c4cb69f2a204dc97c93888262c /library/cpp/messagebus/messqueue.cpp | |
| parent | 99ac40630808727955ac0448822228528f1ea92d (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/messagebus/messqueue.cpp')
| -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 3474d62705f..c956d4a4732 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) { | 
