aboutsummaryrefslogtreecommitdiff
path: root/jim-aio.c
diff options
context:
space:
mode:
Diffstat (limited to 'jim-aio.c')
-rw-r--r--jim-aio.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/jim-aio.c b/jim-aio.c
index 684a1fd..8315c35 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -642,9 +642,12 @@ static void JimAioSetError(Jim_Interp *interp, Jim_Obj *name)
static int JimCheckStreamError(Jim_Interp *interp, AioFile *af)
{
- int ret = af->fops->error(af);
- if (ret) {
- JimAioSetError(interp, af->filename);
+ int ret = 0;
+ if (!af->fops->eof(af)) {
+ ret = af->fops->error(af);
+ if (ret) {
+ JimAioSetError(interp, af->filename);
+ }
}
return ret;
}