mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	connection lost error is now logged only to the console, it was too annoying while being mostly harmless
This commit is contained in:
		
							parent
							
								
									2a53bb03ae
								
							
						
					
					
						commit
						a40bf71fd4
					
				| @ -82,26 +82,10 @@ setTimeout(() => { | |||||||
| 
 | 
 | ||||||
|     lastSyncId = glob.maxSyncIdAtLoad; |     lastSyncId = glob.maxSyncIdAtLoad; | ||||||
|     lastPingTs = new Date().getTime(); |     lastPingTs = new Date().getTime(); | ||||||
|     let connectionBrokenNotification = null; |  | ||||||
| 
 | 
 | ||||||
|     setInterval(async () => { |     setInterval(async () => { | ||||||
|         if (new Date().getTime() - lastPingTs > 30000) { |         if (new Date().getTime() - lastPingTs > 30000) { | ||||||
|             if (!connectionBrokenNotification) { |             console.log("Lost connection to server"); | ||||||
|                 connectionBrokenNotification = $.notify({ |  | ||||||
|                     // options
 |  | ||||||
|                     message: "Lost connection to server" |  | ||||||
|                 },{ |  | ||||||
|                     // options
 |  | ||||||
|                     type: 'danger', |  | ||||||
|                     delay: 100000000 // keep it until we explicitly close it
 |  | ||||||
|                 }); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|         else if (connectionBrokenNotification) { |  | ||||||
|             await connectionBrokenNotification.close(); |  | ||||||
|             connectionBrokenNotification = null; |  | ||||||
| 
 |  | ||||||
|             infoService.showMessage("Re-connected to server"); |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         ws.send(JSON.stringify({ |         ws.send(JSON.stringify({ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner