mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-09 01:45:00 +00:00
Keep active transfers connected when the app returns to foreground (#8651)
* fix(client): keep active transfers alive during foreground checks Foreground used an independent three-second probe that closed live connections while a pong waited behind bulk data. Share the heartbeat clock and refresh its outstanding deadline on validated inbound frames, including incomplete chunk assemblies. * test(client): deliver bulk response before the queued pong * fix(client): preserve latency deadlines when sharing heartbeat pings * fix(client): keep heartbeat cadence during active downloads
This commit is contained in:
@@ -25,6 +25,7 @@ export class ChunkedTransport {
|
||||
supportsDrain?: boolean;
|
||||
send: (frame: Frame, waitForDrain: boolean) => void | Promise<void>;
|
||||
deliver: (frame: Frame) => void;
|
||||
onActivity?: () => void;
|
||||
onFailure?: (error: unknown) => void;
|
||||
},
|
||||
) {
|
||||
@@ -134,6 +135,7 @@ export class ChunkedTransport {
|
||||
{ cause: error },
|
||||
);
|
||||
}
|
||||
this.io.onActivity?.();
|
||||
if (message !== undefined) this.io.deliver(message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user