Commit 3385361a authored by Eric Cano's avatar Eric Cano
Browse files

Added missing support for some return values of recv().

parent b7505bd2
......@@ -693,6 +693,10 @@ void castor::io::readBytes(
// We did read more data...
readPtr += recvRet;
bytesRemaining -= recvRet;
} else if (0 == recvRet) {
throw cta::exception::Exception("In io::readBytes: recv(): connection closed.");
} else if (-1 == recvRet) {
throw cta::exception::Errnum("In io::readBytes: error calling recv():");
} else {
std::stringstream err;
err << "In io::readBytes: unexpected return value from recv: " << recvRet;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment