Fix websocket trying to connect for non-files

This commit is contained in:
2023-11-16 14:46:34 +01:00
parent a8692fe439
commit d62fc8059e

View File

@@ -18,6 +18,10 @@ const update_base = async base => {
if (connected_to === base.path) {
return
}
if (base.type === "dir") {
console.debug("Not opening websocket for directory")
return
}
connected_to = base.path
// If the socket is already active we need to close it
@@ -52,7 +56,7 @@ const update_base = async base => {
if (socket === null) {
update_base(base)
}
}, 3000)
}, 5000)
}
}