Skip to content

Commit 6715aea

Browse files
committed
Fix nil event handler
1 parent f33c781 commit 6715aea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/sync-service/lib/electric/shapes/consumer.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,11 @@ defmodule Electric.Shapes.Consumer do
342342
{:noreply, state, state.hibernate_after}
343343
end
344344

345+
def handle_info({:global_last_seen_lsn, _lsn}, %{event_handler: nil} = state) do
346+
# Consumer not yet initialized, ignore
347+
{:noreply, state}
348+
end
349+
345350
def handle_info({:global_last_seen_lsn, _lsn} = event, state) do
346351
case handle_event(event, state) do
347352
%{terminating?: true} = state ->

0 commit comments

Comments
 (0)