Security server closes connection when protocol is broken.
Client was not able to handle this situation.
[Issue#] N/A
[Bug] Client program may hang.
[Cause] sendToServer function does not support
situation when read returns 0.
[Problem] N/A
[Solution] N/A
[Verification] Run tests.
Change-Id: Ie3002ae88c6ac4b55958b4e0d2d81ca5aacd5c43
LogError("Error in read: " << strerror(err));
return SECURITY_SERVER_API_ERROR_SOCKET;
}
+
+ if (0 == temp) {
+ LogError("Read return 0/Connection closed by server(?)");
+ return SECURITY_SERVER_API_ERROR_SOCKET;
+ }
+
RawBuffer raw(buffer, buffer+temp);
recv.Push(raw);
} while(!recv.Ready());