summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/htslib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/htslib.c b/src/htslib.c
index 4e549e4..64c15b3 100644
--- a/src/htslib.c
+++ b/src/htslib.c
@@ -2283,8 +2283,7 @@ T_SOC newhttp(httrackp * opt, const char *_iadr, htsblk * retour, int port,
#else
const int flags = fcntl(soc, F_GETFL, 0);
unsigned long p = 1; // non bloquant
- if (flags == -1 /*|| fcntl(soc, F_SETFL, flags | O_NONBLOCK) == -1*/
- || ioctl(soc, FIONBIO, &p) != 0) {
+ if (flags == -1 || fcntl(soc, F_SETFL, flags | O_NONBLOCK) == -1) {
snprintf(retour->msg, sizeof(retour->msg),
"Non-blocking socket failed: %s", strerror(errno));
deletesoc(soc);