mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	some tweaks mainly for electron support
This commit is contained in:
		| @@ -225,7 +225,22 @@ async function sync() { | ||||
|             }; | ||||
|         } | ||||
|  | ||||
|         const syncContext = await login(); | ||||
|         try { | ||||
|             const syncContext = await login(); | ||||
|         } | ||||
|         catch (e) { | ||||
|             if (e.message.indexOf('ECONNREFUSED') !== -1) { | ||||
|                 logSync("No connection to sync server."); | ||||
|  | ||||
|                 return { | ||||
|                     success: false, | ||||
|                     message: "No connection to sync server." | ||||
|                 }; | ||||
|             } | ||||
|             else { | ||||
|                 throw e; | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         await pushSync(syncContext); | ||||
|  | ||||
| @@ -261,8 +276,6 @@ function logSyncError(message, e) { | ||||
|         completeMessage += ", inner exception: " + e.stack; | ||||
|     } | ||||
|  | ||||
|     log.info(completeMessage); | ||||
|  | ||||
|     throw new Error(completeMessage); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user