Commit a61db3a4 authored by Niels Möller's avatar Niels Möller
Browse files

* src/io.c (do_buffered_read): Call close_fd_read on error. This

way, the user doensn't have to use an exception handler just for
closing the file.

Rev: src/io.c:1.136
parent ca373df7
......@@ -568,6 +568,9 @@ do_buffered_read(struct io_callback *s,
EXCEPTION_RAISE(fd->e,
make_io_exception(EXC_IO_READ, fd,
errno, NULL));
/* Close the fd, unless it has a write callback. */
close_fd_read(fd);
break;
}
else if (res > 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment