If connection is aborted, now MediaView returns false after stopping the transfer

This commit is contained in:
José Lorenzo Rodríguez 2010-04-13 16:52:39 -04:30
parent 940ce8b06e
commit 0300fc1c31
2 changed files with 7 additions and 3 deletions

View file

@ -208,7 +208,11 @@ class MediaView extends View {
$this->_output();
$this->_clearBuffer();
while (!feof($handle) && $this->_isActive()) {
while (!feof($handle)) {
if (!$this->_isActive()) {
fclose($handle);
return false;
}
set_time_limit(0);
$buffer = fread($handle, $chunkSize);
echo $buffer;
@ -253,7 +257,7 @@ class MediaView extends View {
}
/**
* Returns true if connectios is still active
* Returns true if connection is still active
* @return boolean
* @access protected
*/

View file

@ -73,7 +73,7 @@ class TestMediaView extends MediaView {
var $headers = array();
/**
* active property to mock the status of a remote conenction
* active property to mock the status of a remote connection
*
* @var boolean true
* @access public