Skip to content

Commit

Permalink
liveReload: add hearbeat for keepalive (#6904)
Browse files Browse the repository at this point in the history
  • Loading branch information
developit authored Jul 21, 2023
1 parent 3ae0c14 commit 218c6eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/remix-dev/devServer/liveReload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ export async function liveReload(config: RemixConfig) {
}
);

const heartbeat = setInterval(broadcast, 60000, { type: "PING" });

exitHook(() => clean(config));
return async () => {
wss.close();
clearInterval(heartbeat);
await dispose();
};
}

0 comments on commit 218c6eb

Please sign in to comment.