restart rpc on "Failed to connect to localhost/127.0.0.1:8545" (related to #607)

This commit is contained in:
Roman Volosovskyi 2017-01-03 10:16:15 +02:00
parent a38671e4d8
commit afaef1db9c
1 changed files with 4 additions and 2 deletions

View File

@ -407,5 +407,7 @@
(u/side-effect!
(fn [_ [_ error]]
(.log js/console error)
(when (re-find (re-pattern "Could not connect to the server.") (.-message error))
(status/restart-rpc)))))
(let [message (.-message error)]
(when (or (re-find (re-pattern "Could not connect to the server.") message)
(re-find (re-pattern "Failed to connect") message))
(status/restart-rpc))))))