mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Adjust transfer methods behaviour when interrupted
A transer is attempted even if the transport has been interrupted (with a timeout). When the timeout is reached, transfer methods will return TransferResult::interrupted (-3).
This commit is contained in:
committed by
Dennis Klein
parent
5e97d85956
commit
6932f88c84
@@ -272,7 +272,7 @@ try {
|
||||
int size(0);
|
||||
for (auto& msg : msgVec) {
|
||||
size += msg->GetSize();
|
||||
}
|
||||
}
|
||||
|
||||
fSendPushSem.wait();
|
||||
{
|
||||
@@ -284,7 +284,7 @@ try {
|
||||
return size;
|
||||
} catch (const std::exception& e) {
|
||||
LOG(error) << e.what();
|
||||
return -1;
|
||||
return TransferResult::error;
|
||||
}
|
||||
|
||||
auto Socket::SendQueueReader() -> void
|
||||
@@ -431,7 +431,7 @@ try {
|
||||
return size;
|
||||
} catch (const std::exception& e) {
|
||||
LOG(error) << e.what();
|
||||
return -1;
|
||||
return TransferResult::error;
|
||||
}
|
||||
|
||||
auto Socket::Receive(std::vector<MessagePtr>& msgVec, const int /*timeout*/) -> int64_t
|
||||
@@ -449,14 +449,14 @@ try {
|
||||
int64_t size(0);
|
||||
for (auto& msg : msgVec) {
|
||||
size += msg->GetSize();
|
||||
}
|
||||
}
|
||||
fBytesRx += size;
|
||||
++fMessagesRx;
|
||||
|
||||
return size;
|
||||
return size;
|
||||
} catch (const std::exception& e) {
|
||||
LOG(error) << e.what();
|
||||
return -1;
|
||||
return TransferResult::error;
|
||||
}
|
||||
|
||||
auto Socket::RecvControlQueueReader() -> void
|
||||
|
Reference in New Issue
Block a user