Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
artery (1.2.1)
artery (1.2.2)
artery-browser (~> 0.1)
multiblock (~> 0.2)
nats-pure (~> 2.0, < 3)
Expand Down
7 changes: 7 additions & 0 deletions lib/artery/subscription/synchronization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def synchronize!
def receive_all
synchronization_in_progress! unless synchronization_in_progress?

reset_latest_index!
while receive_all_once == :continue; end
end

Expand Down Expand Up @@ -220,6 +221,12 @@ def receive_updates_once # rubocop:disable Metrics/AbcSize
end
:continue if should_continue
end

def reset_latest_index!
return unless latest_message_index.positive?

info.update!(latest_index: 0)
end
end
end
end
2 changes: 1 addition & 1 deletion lib/artery/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Artery
VERSION = '1.2.1'
VERSION = '1.2.2'
end