aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/io.c b/io.c
index 7b5c707884..76353cb6e0 100644
--- a/io.c
+++ b/io.c
@@ -1151,7 +1151,8 @@ io_internal_wait(VALUE thread, rb_io_t *fptr, int error, int events, struct time
if (ready > 0) {
return ready;
- } else if (ready == 0) {
+ }
+ else if (ready == 0) {
errno = ETIMEDOUT;
return -1;
}
@@ -1179,7 +1180,8 @@ internal_read_func(void *ptr)
if (io_again_p(errno)) {
if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_IN, iis->timeout) == -1) {
return -1;
- } else {
+ }
+ else {
goto retry;
}
}
@@ -1214,7 +1216,8 @@ internal_write_func(void *ptr)
if (io_again_p(e)) {
if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_OUT, iis->timeout) == -1) {
return -1;
- } else {
+ }
+ else {
goto retry;
}
}
@@ -1243,7 +1246,8 @@ internal_writev_func(void *ptr)
if (io_again_p(errno)) {
if (io_internal_wait(iis->th, iis->fptr, errno, RB_WAITFD_OUT, iis->timeout) == -1) {
return -1;
- } else {
+ }
+ else {
goto retry;
}
}