MCPcopy Index your code
hub / github.com/codeaashu/claude-code / scheduleReconnect

Method scheduleReconnect

web/lib/api/stream.ts:154–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152 }
153
154 private scheduleReconnect(): void {
155 if (this.closed || this.reconnectAttempts >= this.maxReconnects) {
156 if (!this.closed) {
157 this.opts.onError(
158 new ApiError(0, "SSE connection permanently lost", "network")
159 );
160 }
161 return;
162 }
163 const delay = Math.min(1_000 * Math.pow(2, this.reconnectAttempts), 30_000);
164 this.reconnectAttempts++;
165 this.reconnectTimer = setTimeout(() => this.connect(), delay);
166 }
167}
168
169/**

Callers 1

connectMethod · 0.95

Calls 2

connectMethod · 0.95
onErrorMethod · 0.80

Tested by

no test coverage detected