[#1170] ir, node: Stop the app on WS connection lost
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
2427593da6
commit
6508136204
3 changed files with 11 additions and 5 deletions
|
@ -47,6 +47,9 @@ func initMorphComponents(c *cfg) {
|
|||
client.WithDialTimeout(morphconfig.DialTimeout(c.appCfg)),
|
||||
client.WithLogger(c.log),
|
||||
client.WithExtraEndpoints(addresses[1:]),
|
||||
client.WithConnLostCallback(func() {
|
||||
c.internalErr <- errors.New("morph connection has been lost")
|
||||
}),
|
||||
)
|
||||
if err != nil {
|
||||
c.log.Info("failed to create neo RPC client",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue