fix: isolate in-memory client persistence

This commit is contained in:
2026-07-22 18:50:46 +08:00
parent 3200089fa4
commit 8523b01231
5 changed files with 64 additions and 12 deletions
+1 -1
View File
@@ -619,7 +619,7 @@ func NewDevice(ctx context.Context, client *Client, selector DeviceSelector, opt
if client == nil {
return nil, errors.New("client must not be nil")
}
config := deviceConfig{httpClient: client.session(), cacheDir: filepath.Dir(client.authPath), delay: 500 * time.Millisecond}
config := deviceConfig{httpClient: client.session(), cacheDir: client.deviceCacheDir, delay: 500 * time.Millisecond}
for _, option := range options {
if option != nil {
if err := option(&config); err != nil {