test: Go/JS SDK 接入清单集成测与 README 示例
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user