Skip to content

Commit

Permalink
在进程启动的时候重新算一下 prefixLength
Browse files Browse the repository at this point in the history
  • Loading branch information
breath-co2 committed May 4, 2017
1 parent acb176e commit 1db2a33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WorkerAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public function __construct($server, $name)

if (isset($this->setting['prefix']) && $this->setting['prefix'])
{
$this->prefix = $this->setting['prefix'] = '/'. ltrim(trim($this->setting['prefix']) .'/', '/');
$this->prefixLength = strlen($this->prefix);
$this->prefix = $this->setting['prefix'] = '/'. ltrim(trim($this->setting['prefix']) .'/', '/');
}
$this->prefixLength = strlen($this->prefix);

if (isset($this->setting['dir']) && $this->setting['dir'])
{
Expand Down

0 comments on commit 1db2a33

Please sign in to comment.