Skip to content

Commit

Permalink
fixed broken chunk transfer scheduling in http+file output - cf #2668
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Dec 4, 2023
1 parent aef6de0 commit 284f891
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/filters/out_http.c
Expand Up @@ -410,7 +410,7 @@ static void httpout_close_session(GF_HTTPOutSession *sess)
{
Bool last_connection = GF_TRUE;
if (!sess->http_sess) return;
assert(!sess->flush_close);

if (sess->is_h2) {
u32 nb_sub_sess = gf_dm_sess_subsession_count(sess->http_sess);
if (nb_sub_sess > 1) {
Expand All @@ -432,6 +432,7 @@ static void httpout_close_session(GF_HTTPOutSession *sess)
sess->http_sess = NULL;
sess->socket = NULL;
sess->done = 1;
sess->flush_close = 0;

if (sess->in_source) sess->in_source->nb_dest--;
}
Expand Down Expand Up @@ -3062,8 +3063,6 @@ static void httpout_process_session(GF_Filter *filter, GF_HTTPOutCtx *ctx, GF_HT
GF_LOG(GF_LOG_INFO, GF_LOG_HTTP, ("[HTTPOut] Done sending %s to %s ("LLU"/"LLU" bytes)\n", sess->path, sess->peer_address, sess->nb_bytes, sess->bytes_in_req));
}

log_request_done(sess);

//keep resource active
sess->canceled = GF_FALSE;

Expand Down Expand Up @@ -4174,8 +4173,8 @@ static GF_Err httpout_process(GF_Filter *filter)
gf_filter_post_process_task(filter);
continue;
}
//push
if (sess->in_source) continue;
//if true push, don't process
if (sess->in_source && !sess->file_in_progress) continue;

//regular download
if (sess->http_sess)
Expand Down

0 comments on commit 284f891

Please sign in to comment.