xiang 6 vuotta sitten
vanhempi
commit
af072e91bf

+ 1 - 1
vendor/GatewayWorker_linux/GatewayWorker/Applications/whisper/start_gateway.php

@@ -91,7 +91,7 @@ $gateway->onConnect = function ($connection) {
         $_SESSION['remotip'] = isset($_SERVER['HTTP_X_REAL_IP'])  ? $_SERVER['HTTP_X_REAL_IP'] : $connection->getRemoteIp();
         //从cdn中提取ip
         $ips = getRealIp($_SERVER['HTTP_X_FORWARDED_FOR']);
-        if (!empty($ips)) {
+        if ($ips == '') { } else {
             $_SESSION['remotip'] = $ips;
         }
         $_SESSION['remotport'] = $connection->getRemotePort();