diff --git a/packages/playground/devEnv/createEsbuildLiveReloadTools.ts b/packages/playground/devEnv/createEsbuildLiveReloadTools.ts index 57e09ae..9651339 100644 --- a/packages/playground/devEnv/createEsbuildLiveReloadTools.ts +++ b/packages/playground/devEnv/createEsbuildLiveReloadTools.ts @@ -53,7 +53,10 @@ export function createEsbuildLiveReloadTools(): { break } } - es.onerror = attemptConnect + es.onerror = () => { + es.close() + attemptConnect() + } } catch (err) { attemptConnect() }