(readtcp): go into fatal error state if poll reports error.
authordrepper <drepper>
Mon, 8 Mar 1999 11:45:04 +0000 (11:45 +0000)
committerdrepper <drepper>
Mon, 8 Mar 1999 11:45:04 +0000 (11:45 +0000)
sunrpc/svc_tcp.c

index cd5cecf..cd24f72 100644 (file)
@@ -312,8 +312,11 @@ readtcp (char *xprtptr, char *buf, int len)
        case 0:
          goto fatal_err;
        default:
        case 0:
          goto fatal_err;
        default:
+          if ((pollfd.revents & POLLERR) || (pollfd.revents & POLLHUP)
+              || (pollfd.revents & POLLNVAL))
+            goto fatal_err;
          break;
          break;
-         }
+       }
     }
   while ((pollfd.revents & POLLIN) == 0);
 
     }
   while ((pollfd.revents & POLLIN) == 0);