[rygel/rygel-0-10] core: If request is cancelled, don't end it twice
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-10] core: If request is cancelled, don't end it twice
- Date: Thu, 7 Jul 2011 16:29:25 +0000 (UTC)
commit d527bf0cf2964b53b4aa60d9934e378628569043
Author: Jens Georg <mail jensge org>
Date: Thu Jul 7 17:41:06 2011 +0200
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
src/rygel/rygel-http-response.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-http-response.vala b/src/rygel/rygel-http-response.vala
index 4cc137e..e60f1a6 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;
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]