powered by nequal
Home » Wozozo_WWW_YouTube » Timeline » 1798

Changeset 1798 -- 2010-04-16 01:13:55

Author
させざき
Comment
adapter should close before throw exception

Diffs

Wozozo_WWW_YouTube/trunk/src/Wozozo/WWW/YouTube/HttpSocketProgressBar.php

@@ -183,7 +183,8 @@
if ($this->out_stream) {
$fwrite = fwrite($this->out_stream, $chunk);
if ($fwrite === false) {
-                             throw new Exception();
+                             $this->close();
+                             throw new Exception('cannot write stream');
}
} else {
$response .= $chunk;