mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 21:34:44 +00:00
* fix(gateway): guard stale-socket restarts by event liveness * fix(gateway): centralize connect-time liveness tracking * fix(web): apply connected status patch atomically * fix(gateway): require active socket for stale checks * fix(gateway): ignore inherited stale event timestamps
16 lines
313 B
TypeScript
16 lines
313 B
TypeScript
export type ConnectedChannelStatusPatch = {
|
|
connected: true;
|
|
lastConnectedAt: number;
|
|
lastEventAt: number;
|
|
};
|
|
|
|
export function createConnectedChannelStatusPatch(
|
|
at: number = Date.now(),
|
|
): ConnectedChannelStatusPatch {
|
|
return {
|
|
connected: true,
|
|
lastConnectedAt: at,
|
|
lastEventAt: at,
|
|
};
|
|
}
|