http_errno_description (priv->parser.http_errno));
}
- conn->error_handler (conn, err);
+ if (!conn->finished) {
+ conn->error_handler (conn, err);
+ }
+ else {
+ msg_err ("got error after HTTP request is finished: %e", err);
+ }
+
g_error_free (err);
REF_RELEASE (pbuf);
err = g_error_new (HTTP_ERROR, priv->parser.http_errno,
"HTTP parser error: %s",
http_errno_description (priv->parser.http_errno));
- conn->error_handler (conn, err);
+
+ if (!conn->finished) {
+ conn->error_handler (conn, err);
+ }
+ else {
+ msg_err ("got error after HTTP request is finished: %e", err);
+ }
+
g_error_free (err);
REF_RELEASE (pbuf);