Bläddra i källkod

php version 小于5.3提示

walkor 11 år sedan
förälder
incheckning
48f634473a
2 ändrade filer med 7 tillägg och 4 borttagningar
  1. 3 4
      bin/workermand
  2. 4 0
      man/Core/SocketWorker.php

+ 3 - 4
bin/workermand

@@ -17,18 +17,17 @@ define('WORKERMAN_ROOT_DIR', realpath(__DIR__."/../")."/");
 
 chdir(WORKERMAN_ROOT_DIR);
 
-require_once WORKERMAN_ROOT_DIR . "man/Core/Master.php";
-
 if(0 === strpos('win', strtolower(PHP_OS)))
 {
-    exit(Man\Core\Master::NAME . " can not run on Windows system\n");
+    exit("Workerman can not run on Windows operating system\n");
 }
 
 if (!version_compare(PHP_VERSION, '5.3.0', '>='))
 {
-    exit(Man\Core\Master::NAME . ' PHP >= 5.3.0 required.' . PHP_EOL);
+    exit('Workerman PHP >= 5.3.0 required."\n");
 }
 
+require_once WORKERMAN_ROOT_DIR . "man/Core/Master.php";
 
 // ==pid-file==
 require_once WORKERMAN_ROOT_DIR . 'man/Core/Lib/Config.php';

+ 4 - 0
man/Core/SocketWorker.php

@@ -530,6 +530,10 @@ abstract class SocketWorker extends AbstractWorker
             {
                 $this->sendBuffers[$this->currentDealFd] = $str_to_send;
             }
+            if(feof($this->sendBuffers[$this->currentDealFd]))
+            {
+                return false;
+            }
             $this->event->add($this->connections[$this->currentDealFd],  Events\BaseEvent::EV_WRITE, array($this, 'tcpWriteToClient'), array($this->currentDealFd));
             return null;
         }