WIN-2308041133\Administrator 1 ay önce
ebeveyn
işleme
8774f3d378
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      socket.php

+ 2 - 1
socket.php

@@ -99,7 +99,8 @@ $ws_worker->onWebSocketConnect = function(TcpConnection $connection) use ($ws_wo
         }
     }
     
-    echo "[WebSocket Connect] type={$connection->type}, uid={$connection->user->uid ?? 0}, to_uid={$connection->to_uid}\n";
+    $uid = isset($connection->user->uid) ? $connection->user->uid : 0;
+    echo "[WebSocket Connect] type={$connection->type}, uid={$uid}, to_uid={$connection->to_uid}\n";
 };
 
 // 当收到客户端消息时