Skip to content

[BUG-047] connection_type initial value is None instead of 'host' #15

@Kickflip73

Description

@Kickflip73

问题描述

GET /status 在 host 模式下返回 connection_type=null,而非合法字符串。

复现步骤

  1. 启动 acp_relay.py(host 模式,无 peer 连接)
  2. GET /status
  3. 观察 connection_type 字段

预期行为

connection_type 应为 "host"(host 模式)或其他合法值之一

实际行为

connection_type 为 null

影响范围

test_nat_integration.py 断言失败;客户端依赖 connection_type 判断连接类型的逻辑会误判

根因

_status 字典初始化时 connection_type 未设默认值

修复方案

host 模式启动时将 connection_type 初始化为 'host';peer 断开时也重置为 'host'

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions