MCPcopy Create free account
hub / github.com/TanStack/query / hostDisconnected

Function hostDisconnected

packages/lit-query/src/controllers/BaseController.ts:90–104  ·  view source on GitHub ↗

* Releases the context `QueryClient`, unless one was passed explicitly, and * calls `onDisconnected`.

()

Source from the content-addressed store, hash-verified

88 * calls `onDisconnected`.
89 */
90 hostDisconnected(): void {
91 if (!this.connected) {
92 return
93 }
94
95 this.connected = false
96
97 if (!this.explicitClient) {
98 this.connectionAttempt += 1
99 this.clearContextClient()
100 this.updateQueryClientResolutionState('pre-connect')
101 }
102
103 this.onDisconnected()
104 }
105
106 /**
107 * Calls `onHostUpdate` before the host renders. Results set during this call

Callers

nothing calls this directly

Calls 1

onDisconnectedMethod · 0.45

Tested by

no test coverage detected