mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
progress of tar import through WS
This commit is contained in:
@@ -38,7 +38,7 @@ function handleMessage(event) {
|
||||
}
|
||||
|
||||
if (message.type === 'sync') {
|
||||
lastPingTs = new Date().getTime();
|
||||
lastPingTs = Date.now();
|
||||
|
||||
if (message.data.length > 0) {
|
||||
console.debug(utils.now(), "Sync data: ", message.data);
|
||||
@@ -81,10 +81,10 @@ setTimeout(() => {
|
||||
ws = connectWebSocket();
|
||||
|
||||
lastSyncId = glob.maxSyncIdAtLoad;
|
||||
lastPingTs = new Date().getTime();
|
||||
lastPingTs = Date.now();
|
||||
|
||||
setInterval(async () => {
|
||||
if (new Date().getTime() - lastPingTs > 30000) {
|
||||
if (Date.now() - lastPingTs > 30000) {
|
||||
console.log("Lost connection to server");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user