diff options
Diffstat (limited to 'src/stream.c')
-rw-r--r-- | src/stream.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/stream.c b/src/stream.c index 9250fe2..24721d2 100644 --- a/src/stream.c +++ b/src/stream.c @@ -18,11 +18,13 @@ enum { static void stream_close(struct stream *strm, int err) { + stream_error_h *errorh = strm->errorh; + strm->terminated = true; + strm->errorh = NULL; - if (strm->errorh) { - strm->errorh(strm, err, strm->errorh_arg); - strm->errorh = NULL; + if (errorh) { + errorh(strm, err, strm->errorh_arg); } } |