Skip to content
Snippets Groups Projects
Commit 8836cfc6 authored by Eric Cano's avatar Eric Cano
Browse files

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

parent 8700deb0
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment