core: Don't push data after HTTP response is cancelled
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 27 Jul 2010 16:05:20 +0000 (19:05 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 27 Jul 2010 16:35:34 +0000 (19:35 +0300)
src/rygel/rygel-live-response.vala

index cfb8832..b6ce55d 100644 (file)
@@ -165,6 +165,10 @@ internal class Rygel.LiveResponse : Rygel.HTTPResponse {
                                 Pad     pad) {
         Idle.add_full (Priority.HIGH_IDLE,
                        () => {
+            if (this.cancellable.is_cancelled ()) {
+                return false;
+            }
+
             this.push_data (buffer.data, buffer.size);
             this.buffered++;