diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -178,10 +178,7 @@ client_finished_cb (SoupMessage *msg, TranscodeClientCtx *ctx) { stp_print_status ("Client finished/aborted, doing cleanup...\n"); - /* Make sure not to double-free. If the server - * has shut down, this will be 0. */ - if (ctx->timeout_handler_id) - stp_cleanup_transcode_client_ctx (ctx); + stp_cleanup_transcode_client_ctx (ctx); } static void @@ -344,8 +341,9 @@ nostreamheader: G_CALLBACK (client_eos_cb), client_ctx); g_signal_connect (client_ctx->msg, "wrote-chunk", G_CALLBACK (can_write_next_client_chunk_cb), client_ctx); - g_signal_connect (client_ctx->msg, "finished", - G_CALLBACK (client_finished_cb), client_ctx); + client_ctx->finished_handler_id = + g_signal_connect (client_ctx->msg, "finished", + G_CALLBACK (client_finished_cb), client_ctx); client_ctx->timeout_handler_id = \ g_timeout_add_seconds (2, (GSourceFunc)increment_write_timer, client_ctx); |