Fix: Cannot download differentially, fallback to full download: Error: cancelled
This commit is contained in:
		
							parent
							
								
									9f48157a49
								
							
						
					
					
						commit
						5776b61af4
					
				| 
						 | 
					@ -6,7 +6,7 @@ import {
 | 
				
			||||||
  autoUpdater
 | 
					  autoUpdater
 | 
				
			||||||
} from 'electron-updater'
 | 
					} from 'electron-updater'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const cancellationToken = new CancellationToken()
 | 
					let cancellationToken = new CancellationToken()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function update(win: Electron.BrowserWindow) {
 | 
					export function update(win: Electron.BrowserWindow) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -62,6 +62,7 @@ export function update(win: Electron.BrowserWindow) {
 | 
				
			||||||
  // Cancel downloading
 | 
					  // Cancel downloading
 | 
				
			||||||
  ipcMain.handle('cancel-download', () => {
 | 
					  ipcMain.handle('cancel-download', () => {
 | 
				
			||||||
    cancellationToken.cancel()
 | 
					    cancellationToken.cancel()
 | 
				
			||||||
 | 
					    cancellationToken = new CancellationToken();
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Install now
 | 
					  // Install now
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue