|
|
@@ -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";
|
|
|
};
|
|
|
|
|
|
// 当收到客户端消息时
|