Commit cb9b116e authored by Pramod R Sanaga's avatar Pramod R Sanaga

Added errno check to check for recvmsg blocking in the client.

parent 907503de
......@@ -468,7 +468,7 @@ int main(int argc, char *argv[])
{
n = recvfrom(sd, msg, MAX_MSG, readFlags,
(struct sockaddr *) &echoServAddr, &echoLen);
if(n == EWOULDBLOCK)
if(n == -1 && errno == EWOULDBLOCK)
{
printf("Going to block in recvmsg\n");
exit(1);
......
Markdown is supported
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