summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2014-07-17 14:25:09 (GMT)
committerNirbheek Chauhan <nirbheek@centricular.com>2014-07-17 14:25:09 (GMT)
commit79ccdc559490bcdab6529dc74bba5d694e8d5913 (patch)
tree2d644e9063fa11f62cb3419037b3ca6727fc8f97 /src/main.c
parent0a8517326c0bfb3416997aa24c525e9ce92fdd84 (diff)
downloadsoup-transcoding-proxy-79ccdc559490bcdab6529dc74bba5d694e8d5913.zip
soup-transcoding-proxy-79ccdc559490bcdab6529dc74bba5d694e8d5913.tar.gz
server: Fix another potential crash
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 2d3e537..e9be17d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -124,9 +124,9 @@ invoke_write_client_chunk (TranscodeClientCtx *ctx)
stp_print_status ("*");
/* XXX: If samples are coming in too quickly, this can get invoked
- * after the client has disconnected and the SoupMessage is invalid
- * So, we check if the msg is still a msg before trying to append. */
- if (G_UNLIKELY (!SOUP_IS_MESSAGE (ctx->msg)))
+ * after the client has disconnected and the SoupMessage is invalid.
+ * When the client disconnects, timeout_handler_id is set to 0. */
+ if (G_UNLIKELY (ctx->timeout_handler_id == 0))
return FALSE;
g_signal_emit_by_name (ctx->appsink, "pull-sample", &sample);