(err: Error)
| 172 | const oldWs = this.ws; |
| 173 | this.ws = null; |
| 174 | oldWs.close(); |
| 175 | } |
| 176 | |
| 177 | const token = await this.getToken(); |
| 178 | if (gen !== this.generation || this.destroyed) return; |
| 179 | const ticket = await fetchConnectionTicket(this.url, token); |
| 180 | // disconnect() may have run while we were awaiting the token. Bail before |
| 181 | // creating the socket so we don't leak a WebSocket + ping timer past |
| 182 | // provider unmount (e.g. sign-out, navigation, strict-mode remount). |
| 183 | if (gen !== this.generation || this.destroyed) return; |
nothing calls this directly
no test coverage detected