diff --git a/packages/remix-dev/devServer/liveReload.ts b/packages/remix-dev/devServer/liveReload.ts index e74ca3242bd..3ac6de4b69e 100644 --- a/packages/remix-dev/devServer/liveReload.ts +++ b/packages/remix-dev/devServer/liveReload.ts @@ -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(); }; }