Skip to content

Commit

Permalink
fix: Adapt to php 8.1 and swoole 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
huanglonghui committed Apr 16, 2024
1 parent 4b76c42 commit a817b7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
}
],
"require": {
"php": ">=7.1.0",
"ext-swoole":"^4.4.0",
"php": ">=8.1.0",
"ext-swoole":">=4.4.0",
"easyswoole/component": ">=1.0",
"easyswoole/spl": "^1.1",
"easyswoole/spl": "^2.0",
"easyswoole/utility": "^1.0",
"easyswoole/trigger": "^1.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Actor.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function register(string $actorClass)
}
}

public function attachServer(\swoole_server $server)
public function attachServer(\Swoole\Server $server)
{
$list = $this->generateProcess();
foreach ($list['proxy'] as $proxy){
Expand Down Expand Up @@ -185,4 +185,4 @@ public function generateProcess():array
}
return $list;
}
}
}
4 changes: 2 additions & 2 deletions src/ProxyProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function proxy(string $socketFile,string $proxyData,$timeout = 30)
'package_max_length' => 1024*1024
]
);
$client->connect($socketFile, null, 3);
$client->connect($socketFile, 0, 3);
if(!$client->isConnected()){
return null;
}else{
Expand All @@ -147,4 +147,4 @@ private function proxy(string $socketFile,string $proxyData,$timeout = 30)
}
}
}
}
}

0 comments on commit a817b7c

Please sign in to comment.