reset timer correct.
This commit is contained in:
parent
90bde5e569
commit
29cfd8df4e
@ -29,11 +29,7 @@ int64 io_trywrite(int64 d,const char* buf,int64 len) {
|
||||
}
|
||||
r=write(d,buf,len);
|
||||
if (!e->nonblock) {
|
||||
new.it_interval.tv_usec=0;
|
||||
new.it_interval.tv_sec=0;
|
||||
new.it_value.tv_usec=0;
|
||||
new.it_value.tv_sec=0;
|
||||
setitimer(ITIMER_REAL,&new,&old);
|
||||
setitimer(ITIMER_REAL,&old,0);
|
||||
}
|
||||
if (r==-1) {
|
||||
if (errno==EINTR) errno=EAGAIN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user