Merge pull request #5410 from blockscout/vb-handle-realtime-fetcher-exited

Handle exited realtime fetcher
pull/5411/head
Victor Baranov 3 years ago committed by GitHub
commit 8bdc868283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 8
      apps/indexer/lib/indexer/block/realtime/fetcher.ex

@ -7,6 +7,7 @@
### Fixes
- [#5416](https://github.com/blockscout/blockscout/pull/5416) - Fix getsourcecode for EOA addresses
- [#5410](https://github.com/blockscout/blockscout/pull/5410) - Handle exited realtime fetcher
- [#5383](https://github.com/blockscout/blockscout/pull/5383) - Fix reload transactions button
- [#5381](https://github.com/blockscout/blockscout/pull/5381), [#5397](https://github.com/blockscout/blockscout/pull/5397) - Fix exchange rate broadcast error
- [#5375](https://github.com/blockscout/blockscout/pull/5375) - Fix pending transactions fetcher

@ -155,6 +155,14 @@ defmodule Indexer.Block.Realtime.Fetcher do
Logger.debug(fn -> ["Could not connect to websocket: #{inspect(reason)}. Continuing with polling."] end)
state
end
catch
:exit, _reason ->
if Map.get(state, :timer) && state.timer do
Process.cancel_timer(state.timer)
end
timer = schedule_polling()
%{state | timer: timer}
end
defp subscribe_to_new_heads(state, _), do: state

Loading…
Cancel
Save