From 36370c9ab5c38f62b31ef85d36ed11d3a331f159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Overg=C3=A5rd=20Nielsen?= Date: Fri, 23 Sep 2022 10:53:14 +0200 Subject: [PATCH] Reduce number of attempts to 3 --- generator/lib/src/realm_object_generator.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generator/lib/src/realm_object_generator.dart b/generator/lib/src/realm_object_generator.dart index 29af82d7d7..0a978a8d5d 100644 --- a/generator/lib/src/realm_object_generator.dart +++ b/generator/lib/src/realm_object_generator.dart @@ -42,9 +42,10 @@ Future _getResolvedLibrary(LibraryElement library, Resol if (someResult is ResolvedLibraryResult) return someResult; } catch (_) { ++attempts; - if (attempts == 10) { + if (attempts == 3) { + // 3 is the magic number ¯\_(ツ)_/¯ log.severe('Internal error: Analysis session ' - 'did not stabilize after ten attempts!'); + 'did not stabilize after $attempts attempts!'); return null; } }