diff --git a/main/gbx/gbx_stream.c b/main/gbx/gbx_stream.c index 2cc319669..4b12aa50e 100644 --- a/main/gbx/gbx_stream.c +++ b/main/gbx/gbx_stream.c @@ -430,6 +430,9 @@ int STREAM_read_max(STREAM *stream, void *addr, int len) if (errno == EINTR) continue; + if (errno == 0) + stop_watching(stream, GB_WATCH_READ); + switch(errno) { case 0: @@ -563,7 +566,8 @@ static void fill_buffer(STREAM *stream, char *addr) if (errno == EINTR) continue; - stop_watching(stream, GB_WATCH_READ); + if (errno == 0) + stop_watching(stream, GB_WATCH_READ); switch(errno) {