Set socket interval for hearbeats to 10s (#3091)

This commit is contained in:
hq1 2023-06-28 13:53:37 +02:00 committed by GitHub
parent ff11b3f26d
commit 21a968ef2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,7 @@ if (csrfToken && websocketUrl) {
let url = websocketUrl.getAttribute("content")
let liveUrl = (url === "") ? "/live" : new URL("/live", url).href;
let liveSocket = new LiveSocket(liveUrl, Socket, {
heartbeatIntervalMs: 10000,
params: { _csrf_token: token }, hooks: {}, dom: {
// for alpinejs integration
onBeforeElUpdated(from, to) {