Merge PR #1300: tailscale Windows fix, quota pagination, SSE abort handling
- fix(tunnel): cross-platform tailscale probes without shell redirection - feat(usage): paginate provider limits with page size controls - feat(providers): stop control for one-by-one connection testing - fix(sse): close stream gracefully on abort/disconnect instead of pipe errors - ui(quota): simplify header, always show pagination in one row Co-authored-by: philau2512 <dplau25122002@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -113,10 +113,22 @@ export function createDisconnectAwareStream(transformStream, streamController) {
|
||||
}
|
||||
controller.enqueue(value);
|
||||
} catch (error) {
|
||||
const wasConnected = streamController.isConnected();
|
||||
streamController.handleError(error);
|
||||
reader.cancel().catch(() => {});
|
||||
writer.abort().catch(() => {});
|
||||
controller.error(error);
|
||||
|
||||
if (!wasConnected || error.name === "AbortError" || error.message?.includes("aborted")) {
|
||||
try {
|
||||
controller.close();
|
||||
} catch (e) {
|
||||
// Stream might already be closed or cancelled
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
controller.error(error);
|
||||
} catch (e) { /* already closed */ }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user