set flag only if setting to non-blocking worked
This commit is contained in:
parent
aeb609627b
commit
27ffe564a7
@ -5,6 +5,6 @@
|
||||
|
||||
void io_nonblock(int64 d) {
|
||||
io_entry* e=array_get(&io_fds,sizeof(io_entry),d);
|
||||
fcntl(d,F_SETFL,fcntl(d,F_GETFL,0) | O_NDELAY);
|
||||
if (fcntl(d,F_SETFL,fcntl(d,F_GETFL,0) | O_NDELAY)==0)
|
||||
if (e) e->nonblock=1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user