diff --git a/lib/gui/app.js b/lib/gui/app.js index e5da33c9..c4a0c56e 100644 --- a/lib/gui/app.js +++ b/lib/gui/app.js @@ -143,7 +143,17 @@ app.run(($timeout, DriveScannerService, DrivesModel, ErrorService) => { }); }); - DriveScannerService.on('error', ErrorService.reportException); + DriveScannerService.on('error', (error) => { + + // Stop the drive scanning loop in case of errors, + // otherwise we risk presenting the same error over + // and over again to the user, while also heavily + // spamming our error reporting service. + DriveScannerService.stop(); + + return ErrorService.reportException(error); + }); + DriveScannerService.start(); });