Ticket #8117: mythweb-slow.patch

File mythweb-slow.patch, 1.0 KB (added by David Kubicek <foceni@…>, 10 years ago)

Fix patch for MythBackend?.php

  • mythplugins/mythweb/classes/MythBackend.php

     
    130130    // Flush the input buffer to clear out any unwanted events that might have shown up
    131131    // @todo:  should really just be checking for SYSTEM_EVENT in receiveData
    132132    //         and handling things accordingly there.
    133         $this->receiveData(1);
     133        $this->receiveData(0, 1);
    134134    // The format should be <length + whitespace to 8 total bytes><data>
    135135        if (is_array($command))
    136136            $command = implode(MythBackend::$backend_separator, $command);
     
    139139        return $this->receiveData();
    140140    }
    141141
    142     public function receiveData($timeout = 30) {
     142    public function receiveData($timeout = 30, $timeout_ms = 0) {
    143143        $this->connect();
    144         stream_set_timeout($this->fp, $timeout);
     144        stream_set_timeout($this->fp, $timeout, $timeout_ms);
    145145
    146146    // Read the response header to find out how much data we'll be grabbing
    147147        $length = rtrim(fread($this->fp, 8));