Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

rigazilla
Copy link
Contributor

Added the same behaviour as for the posix socket: throw exception if recv read 0 bytes.

@infinispanrelease
Copy link

SUCCESS - TeamCity HotRod C++ Client :: Pull requests monitor - RHEL Build 644 for 9ac35b4
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:06:00

@infinispanrelease
Copy link

SUCCESS - TeamCity HotRod C++ Client :: Pull requests monitor - WIN_S2012 Build 507 for 9ac35b4
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:08:22

@rvansa
Copy link
Member

rvansa commented Jul 8, 2016

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)
Copy link
Contributor

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.

Copy link
Contributor

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?

@rigazilla
Copy link
Contributor Author

Fixed indentation and added some curl brakets

@infinispanrelease
Copy link

SUCCESS - TeamCity HotRod C++ Client :: Pull requests monitor - RHEL Build 649 for 29de879
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:08:54

@rigazilla
Copy link
Contributor Author

Added a test

@infinispanrelease
Copy link

SUCCESS - TeamCity HotRod C++ Client :: Pull requests monitor - RHEL Build 650 for 797f086
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:06:38

@infinispanrelease
Copy link

FAILURE - TeamCity HotRod C++ Client :: Pull requests monitor - WIN_S2012 Build 514 for 797f086
Tests: 0, 0 failed (0 new), 0 ignored. Build time: 00:18:53

Process exited with code 255

@tristantarrant
Copy link
Member

Rerunning failed build on Windows

@tristantarrant
Copy link
Member

Pushed, thanks

@rigazilla rigazilla deleted the HRCPP-283/simplehangs branch October 12, 2017 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants