Handle exited realtime fetcher

pull/5410/head
Viktor Baranov 3 years ago
parent aa5636e2c1
commit 9e6bae8929
  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