Skip to content
Snippets Groups Projects
Commit cb9b116e authored by Pramod R Sanaga's avatar Pramod R Sanaga
Browse files

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

parent 907503de
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
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