walkor 12 年之前
父節點
當前提交
93ccb638a8
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 2 2
      Core/Lib/Config.php
  2. 1 0
      bin/workermand

+ 2 - 2
Core/Lib/Config.php

@@ -15,7 +15,7 @@ class Config
         }
         self::$config['workerman'] = self::parseFile($config_file);
         self::$filename = realpath($config_file);
-        foreach(glob(WORKERMAN_ROOT_DIR . 'conf.d/*.conf') as $config_file)
+        foreach(glob(WORKERMAN_ROOT_DIR . 'conf/conf.d/*.conf') as $config_file)
         {
             $worker_name = basename($config_file, '.conf');
             self::$config[$worker_name] = self::parseFile($config_file);
@@ -64,7 +64,7 @@ class Config
     
     public static function reload()
     {
-        self::$instances = array();
+        self::$instances = null;
     }
     
 }

+ 1 - 0
bin/workermand

@@ -16,6 +16,7 @@ $cmd = $argv[1];
 define('WORKERMAN_ROOT_DIR', realpath(__DIR__."/../")."/");
 
 // ==pid-file==
+WORKERMAN\Core\Lib\Config::instance();
 require_once WORKERMAN_ROOT_DIR . 'Core/Lib/Config.php';
 if(!($pid_file = WORKERMAN\Core\Lib\Config::get('workerman.pid_file')))
 {