Fix issues after rebase

This commit is contained in:
Dennis Klein 2019-02-25 15:01:37 +01:00 committed by Dennis Klein
parent a08a34acd5
commit 02e1511667
2 changed files with 17 additions and 3 deletions

View File

@ -186,8 +186,8 @@ auto Socket::BindDataEndpoint() -> void
LOG(debug) << "OFI transport (" << fId << "): data band bound to " << fLocalAddr; LOG(debug) << "OFI transport (" << fId << "): data band bound to " << fLocalAddr;
} }
auto Socket::Connect(const string& address) -> void auto Socket::Connect(const string& address) -> bool
{ try {
fRemoteAddr = Context::VerifyAddress(address); fRemoteAddr = Context::VerifyAddress(address);
if (fRemoteAddr.Protocol == "verbs") { if (fRemoteAddr.Protocol == "verbs") {
fNeedOfiMemoryRegistration = true; fNeedOfiMemoryRegistration = true;
@ -201,6 +201,20 @@ auto Socket::Connect(const string& address) -> void
boost::asio::post(fIoStrand, std::bind(&Socket::SendQueueReader, this)); boost::asio::post(fIoStrand, std::bind(&Socket::SendQueueReader, this));
boost::asio::post(fIoStrand, std::bind(&Socket::RecvControlQueueReader, this)); boost::asio::post(fIoStrand, std::bind(&Socket::RecvControlQueueReader, this));
return true;
}
// TODO catch the correct ofi error
catch (const SilentSocketError& e)
{
// do not print error in this case, this is handled by FairMQDevice
// in case no connection could be established after trying a number of random ports from a range.
return false;
}
catch (const SocketError& e)
{
LOG(error) << "OFI transport: " << e.what();
return false;
} }
auto Socket::ConnectControlEndpoint() -> void auto Socket::ConnectControlEndpoint() -> void

View File

@ -61,7 +61,7 @@ auto TransportFactory::CreateMessage(UnmanagedRegionPtr& region,
auto TransportFactory::CreateSocket(const string& type, const string& name) -> SocketPtr auto TransportFactory::CreateSocket(const string& type, const string& name) -> SocketPtr
{ {
return SocketPtr{new Socket(fContext, type, name, GetId(), this)}; return SocketPtr{new Socket(fContext, type, name, GetId())};
} }
auto TransportFactory::CreatePoller(const vector<FairMQChannel>& /*channels*/) const -> PollerPtr auto TransportFactory::CreatePoller(const vector<FairMQChannel>& /*channels*/) const -> PollerPtr