xiang 6 年之前
父节点
当前提交
ab352f3b3e
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      vendor/GatewayWorker_linux/GatewayWorker/Applications/whisper/start_gateway.php

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

@@ -91,7 +91,8 @@ $gateway->onConnect = function ($connection) {
         $_SESSION['remotport'] = $connection->getRemotePort();
         //cdn处理
         $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
-        if (isset($ips[0])  && $ips[0]) { } else {
+
+        if (isset($ips[0])  && $ips[0]) {
             $_SESSION['remotip'] = $ips[0];
         }
         //cdn处理