fix(02-review): WR-05 forward abort signal through vpnStatus()/dnsStatus()
server.network-summary's fetcher batches four RPCs but only two forwarded the AbortSignal useCachedResource provides for abort-on-unmount; rpcClient.vpnStatus()/dnsStatus() had no signal parameter at all, so aborter.abort() couldn't cancel them, partially defeating the documented abort-on-unmount contract for this resource. Add an optional signal parameter to both convenience methods (mirroring the pattern used throughout rpc-client.ts) and forward it from Server.vue. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1001,7 +1001,7 @@ class RPCClient {
|
||||
}
|
||||
|
||||
// VPN
|
||||
async vpnStatus(): Promise<{
|
||||
async vpnStatus(signal?: AbortSignal): Promise<{
|
||||
connected: boolean
|
||||
provider?: string
|
||||
interface?: string
|
||||
@@ -1021,6 +1021,7 @@ class RPCClient {
|
||||
return this.call({
|
||||
method: 'vpn.status',
|
||||
params: {},
|
||||
signal,
|
||||
dedup: true, // read-only status; safe to collapse concurrent callers (PERF-02)
|
||||
})
|
||||
}
|
||||
@@ -1082,7 +1083,7 @@ class RPCClient {
|
||||
}
|
||||
|
||||
// DNS
|
||||
async dnsStatus(): Promise<{
|
||||
async dnsStatus(signal?: AbortSignal): Promise<{
|
||||
provider: string
|
||||
servers: string[]
|
||||
doh_enabled: boolean
|
||||
@@ -1092,6 +1093,7 @@ class RPCClient {
|
||||
return this.call({
|
||||
method: 'network.dns-status',
|
||||
params: {},
|
||||
signal,
|
||||
dedup: true, // read-only status; safe to collapse concurrent callers (PERF-02)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user