about summary refs log tree commit diff
path: root/sunrpc/svc_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sunrpc/svc_tcp.c')
-rw-r--r--sunrpc/svc_tcp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sunrpc/svc_tcp.c b/sunrpc/svc_tcp.c
index cd5cecf0f7..cd24f726c9 100644
--- a/sunrpc/svc_tcp.c
+++ b/sunrpc/svc_tcp.c
@@ -312,8 +312,11 @@ readtcp (char *xprtptr, char *buf, int len)
 	case 0:
 	  goto fatal_err;
 	default:
+          if ((pollfd.revents & POLLERR) || (pollfd.revents & POLLHUP)
+              || (pollfd.revents & POLLNVAL))
+            goto fatal_err;
 	  break;
-	  }
+	}
     }
   while ((pollfd.revents & POLLIN) == 0);