test: Go/JS SDK 接入清单集成测与 README 示例

This commit is contained in:
Nixevol
2026-09-30 08:35:09 +08:00
parent 77d2dbddb1
commit 2f750bcb0f
12 changed files with 1881 additions and 6 deletions
+4
View File
@@ -84,6 +84,9 @@ type Client struct {
helloSentAt time.Time
ctx context.Context
cancel context.CancelFunc
// downCh 串行处理非 resp 下行,避免在 MQTT 收包回调里同步 request 死锁。
downCh chan []byte
}
// New 创建客户端(尚未连接)。
@@ -94,6 +97,7 @@ func New() *Client {
receiptSeen: make(map[string]struct{}),
state: StateOffline,
backoff: newReconnectBackoff(),
downCh: make(chan []byte, 256),
}
}