Fix playground live reload multiplying connections on error in Chrome and Safari (#238)
This commit is contained in:
parent
a3d9892841
commit
2b8a1e3ed1
1 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,10 @@ export function createEsbuildLiveReloadTools(): {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
es.onerror = attemptConnect
|
es.onerror = () => {
|
||||||
|
es.close()
|
||||||
|
attemptConnect()
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
attemptConnect()
|
attemptConnect()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue