Fix websocket trying to connect for non-files
This commit is contained in:
@@ -18,6 +18,10 @@ const update_base = async base => {
|
|||||||
if (connected_to === base.path) {
|
if (connected_to === base.path) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (base.type === "dir") {
|
||||||
|
console.debug("Not opening websocket for directory")
|
||||||
|
return
|
||||||
|
}
|
||||||
connected_to = base.path
|
connected_to = base.path
|
||||||
|
|
||||||
// If the socket is already active we need to close it
|
// If the socket is already active we need to close it
|
||||||
@@ -52,7 +56,7 @@ const update_base = async base => {
|
|||||||
if (socket === null) {
|
if (socket === null) {
|
||||||
update_base(base)
|
update_base(base)
|
||||||
}
|
}
|
||||||
}, 3000)
|
}, 5000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user