Ticket #8117: mythweb-slow.patch
File mythweb-slow.patch, 1.0 KB (added by , 14 years ago) |
---|
-
mythplugins/mythweb/classes/MythBackend.php
130 130 // Flush the input buffer to clear out any unwanted events that might have shown up 131 131 // @todo: should really just be checking for SYSTEM_EVENT in receiveData 132 132 // and handling things accordingly there. 133 $this->receiveData( 1);133 $this->receiveData(0, 1); 134 134 // The format should be <length + whitespace to 8 total bytes><data> 135 135 if (is_array($command)) 136 136 $command = implode(MythBackend::$backend_separator, $command); … … 139 139 return $this->receiveData(); 140 140 } 141 141 142 public function receiveData($timeout = 30 ) {142 public function receiveData($timeout = 30, $timeout_ms = 0) { 143 143 $this->connect(); 144 stream_set_timeout($this->fp, $timeout );144 stream_set_timeout($this->fp, $timeout, $timeout_ms); 145 145 146 146 // Read the response header to find out how much data we'll be grabbing 147 147 $length = rtrim(fread($this->fp, 8));