- remove all PHP "_ZMQ_" related dependencies from Pathfinder. PHP´s native Sockets work as replacement
- added status information for "WebSocket" installations to `/setup` page (e.g. active connections, startup time) - removed "ext-zmq" as required PHP extension - removed "react/zmq" as required Composer package - removed "websoftwares/monolog-zmq-handler" as required Composer package
This commit is contained in:
@@ -14,7 +14,6 @@ use lib\api\CcpClient;
|
||||
use lib\Config;
|
||||
use lib\Resource;
|
||||
use lib\Monolog;
|
||||
use lib\Socket;
|
||||
use lib\Util;
|
||||
use Model;
|
||||
use DB;
|
||||
@@ -491,7 +490,7 @@ class Controller {
|
||||
* @param bool $deleteSession
|
||||
* @param bool $deleteLog
|
||||
* @param bool $deleteCookie
|
||||
* @throws \ZMQSocketException
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function logoutCharacter(\Base $f3, bool $all = false, bool $deleteSession = true, bool $deleteLog = true, bool $deleteCookie = false){
|
||||
$sessionCharacterData = (array)$f3->get(Api\User::SESSION_KEY_CHARACTERS);
|
||||
@@ -517,7 +516,7 @@ class Controller {
|
||||
|
||||
if($characterIds){
|
||||
// broadcast logout information to webSocket server
|
||||
(new Socket( Config::getSocketUri() ))->sendData('characterLogout', $characterIds);
|
||||
$f3->webSocket()->write('characterLogout', $characterIds);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,7 +620,7 @@ class Controller {
|
||||
}
|
||||
|
||||
if(empty($return->error)){
|
||||
$f3->set($cacheKey, $return, 15);
|
||||
$f3->set($cacheKey, $return, 60);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -974,15 +973,4 @@ class Controller {
|
||||
return Config::getEnvironmentData($key);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* health check for ICP socket -> ping request
|
||||
* @param $ttl
|
||||
* @param $load
|
||||
* @throws \ZMQSocketException
|
||||
*/
|
||||
static function checkTcpSocket($ttl, $load){
|
||||
(new Socket( Config::getSocketUri(), $ttl ))->sendData('healthCheck', $load);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user