-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HRCPP-283 Added exception if recv read 0 byte #230
Conversation
Looks ok 👍 |
@@ -211,6 +211,10 @@ void Socket::setTimeout(int timeout) { | |||
|
|||
size_t Socket::read(char *p, size_t length) { | |||
ssize_t n = recv(fd, p, (int) length, 0); | |||
if (n == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting seems to be inconsistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a test for this?
Fixed indentation and added some curl brakets |
Added a test |
Rerunning failed build on Windows |
Pushed, thanks |
Added the same behaviour as for the posix socket: throw exception if recv read 0 bytes.