Skip to content

Commit

Permalink
attachextract: reset extractor connection on any error
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Stepanek <[email protected]>
  • Loading branch information
rsto committed Jun 15, 2023
1 parent eb1f063 commit 5c901ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions imap/attachextract.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,13 @@ static int extractor_httpreq(struct extractor_ctx *ext,
"method=<%s> guid=<%s> statuscode=<%d> r=<%s>",
method, guidstr, *res_statuscode, error_message(r));

if (r) {
xsyslog(LOG_WARNING, "failed HTTP request - resetting connection",
"method=<%s> guid=<%s> statuscode=<%d> r=<%s>",
method, guidstr, *res_statuscode, error_message(r));
extractor_disconnect(ext);
}

spool_free_hdrcache(res_hdrs);
buf_free(&req_buf);
buf_free(&url_buf);
Expand Down

0 comments on commit 5c901ef

Please sign in to comment.