sleep before reconnecting after an error in listen, and fix default z-wave js server URL
This commit is contained in:
parent
762d1baea4
commit
759799acdc
2 changed files with 2 additions and 1 deletions
|
@ -15,7 +15,7 @@ type Config struct {
|
|||
}
|
||||
|
||||
var C = Config{
|
||||
ZWaveJSServer: "ws://home-assistant:3000",
|
||||
ZWaveJSServer: "ws://addon_core_zwave_js:3000",
|
||||
SqliteDatabase: "/data/lockserver.db",
|
||||
HTTPBind: ":8080",
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ func (c *Client) DialAndListen(ctx context.Context) {
|
|||
}
|
||||
|
||||
logrus.WithError(err).Error("error communicating with zwavejs server")
|
||||
time.Sleep(time.Second * 5)
|
||||
continue
|
||||
}
|
||||
_ = c.conn.Close()
|
||||
|
|
Loading…
Reference in a new issue