select() -> poll(). Bug 2831
[exim.git] / src / src / malware.c
index 10a390dfa4d222ff7a69ade503e66a3677e4f135..d9ab3b9dd19658a584da824d4b04f85ec2857b57 100644 (file)
@@ -277,11 +277,7 @@ int fd = ip_connectedsocket(SOCK_STREAM, hostname, port, port, 5,
 /* Under some fault conditions, FreeBSD 12.2 seen to send a (non-TFO) SYN
 and, getting no response, wait for a long time.  Impose a 5s max. */
 if (fd >= 0)
-  {
-  struct timeval tv = {.tv_sec = 5};
-  fd_set fds;
-  FD_ZERO(&fds); FD_SET(fd, &fds); (void) select(fd+1, NULL, &fds, NULL, &tv);
-  }
+  (void) poll_one_fd(fd, POLLOUT, 5 * 1000);
 #endif
 return fd;
 }