Skip to content

Commit

Permalink
Merge pull request #727 from openziti/fix-multipart-cb-result
Browse files Browse the repository at this point in the history
do not clobber status for chained requests
  • Loading branch information
ekoby authored Sep 17, 2024
2 parents 0b0d233 + 91be622 commit 2fa393d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions library/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,7 @@ void on_write_completed(struct ziti_conn *conn, struct ziti_write_req_s *req, in
model_list_iter it = model_list_iterator(&req->chain);
do {
if (r->cb != NULL) {
if (status == 0) {
status = (int) r->len;
}

r->cb(conn, status, r->ctx);
r->cb(conn, status ? status : (ssize_t) r->len, r->ctx);
}
r = model_list_it_element(it);
it = model_list_it_next(it);
Expand Down

0 comments on commit 2fa393d

Please sign in to comment.