return early

master
leitner 1 year ago
parent b4ba06aee4
commit 80328bccf9

@ -108,11 +108,13 @@ int64 io_tryread(int64 d,char* buf,int64 len) {
if (r==-1 && errno==EAGAIN) { if (r==-1 && errno==EAGAIN) {
if (e->goterror) r=-3; if (e->goterror) r=-3;
io_eagain_read(d); io_eagain_read(d);
return r;
} }
if (r==-1) { if (r==-1) {
if (errno==EINTR) errno=EAGAIN; if (errno==EINTR) errno=EAGAIN;
if (errno!=EAGAIN) if (errno!=EAGAIN)
r=-3; r=-3;
return r;
} }
if (r!=len) { if (r!=len) {
e->canread=0; e->canread=0;

Loading…
Cancel
Save