summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2011-07-07 17:41:06 +0200
committerJens Georg <mail@jensge.org>2011-07-07 18:29:11 +0200
commitd527bf0cf2964b53b4aa60d9934e378628569043 (patch)
treecbeeb8342ec8b78781d979e3a4f379d87db689e6
parent19694fa6bbc39c93dc6e602b233347d409b07771 (diff)
downloadrygel-d527bf0cf2964b53b4aa60d9934e378628569043.tar.gz
core: If request is cancelled, don't end it twice
This was causing these rare crashes: rygel_http_response_real_run_co: code should not be reached
-rw-r--r--src/rygel/rygel-http-response.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rygel/rygel-http-response.vala b/src/rygel/rygel-http-response.vala
index 4cc137e8..e60f1a6b 100644
--- a/src/rygel/rygel-http-response.vala
+++ b/src/rygel/rygel-http-response.vala
@@ -242,9 +242,13 @@ internal class Rygel.HTTPResponse : GLib.Object, Rygel.StateMachine {
}
}
+ // If pipeline state didn't change due to the request being cancelled,
+ // end this request. Otherwise it was already ended.
if (!ret) {
Idle.add_full (this.priority, () => {
- this.end (false, KnownStatusCode.NONE);
+ if (!this.cancellable.is_cancelled ()) {
+ this.end (false, KnownStatusCode.NONE);
+ }
return false;
});