--- mythplugins/mythweb/classes/MythBackend.php	(revision 23626)
+++ mythplugins/mythweb/classes/MythBackend.php	(working copy)
@@ -130,7 +130,7 @@
     // Flush the input buffer to clear out any unwanted events that might have shown up
     // @todo:  should really just be checking for SYSTEM_EVENT in receiveData
     //         and handling things accordingly there.
-        $this->receiveData(1);
+        $this->receiveData(0, 1);
     // The format should be <length + whitespace to 8 total bytes><data>
         if (is_array($command))
             $command = implode(MythBackend::$backend_separator, $command);
@@ -139,9 +139,9 @@
         return $this->receiveData();
     }
 
-    public function receiveData($timeout = 30) {
+    public function receiveData($timeout = 30, $timeout_ms = 0) {
         $this->connect();
-        stream_set_timeout($this->fp, $timeout);
+        stream_set_timeout($this->fp, $timeout, $timeout_ms);
 
     // Read the response header to find out how much data we'll be grabbing
         $length = rtrim(fread($this->fp, 8));
