Skip to content

Commit 67b03ca

Browse files
committed
Add note about possible empty data
1 parent 1ccf098 commit 67b03ca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/flipper/adapters/poll.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ def initialize(poller, adapter)
2323
# Yes, this will block the main thread, but that's better than thinking
2424
# nothing is enabled.
2525
if adapter.features.empty?
26-
@poller.sync
26+
begin
27+
@poller.sync
28+
rescue => error
29+
# TODO: Warn here that it's possible that no data has been synced
30+
# and flags are being evaluated without flag data being present
31+
# until a sync completes. We rescue to avoid flipper being down
32+
# causing your processes to crash.
33+
end
2734
end
2835

2936
@poller.start

0 commit comments

Comments
 (0)