From b4992cb3930d5154001edb8d260bc0173f91ce75 Mon Sep 17 00:00:00 2001 From: Arsen Musayelyan Date: Sun, 22 Aug 2021 13:13:37 -0700 Subject: [PATCH] Update infinitime library to fix connection bug --- go.mod | 4 +++- go.sum | 2 -- main.go | 1 - socket.go | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index e03802c..83b63db 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module go.arsenm.dev/itd go 1.16 +replace go.arsenm.dev/infinitime => /home/arsen/Code/infinitime + require ( github.com/VividCortex/ewma v1.2.0 // indirect github.com/abiosoft/ishell v2.0.0+incompatible @@ -19,7 +21,7 @@ require ( github.com/spf13/cast v1.4.1 // indirect github.com/spf13/cobra v1.2.1 github.com/spf13/viper v1.8.1 - go.arsenm.dev/infinitime v0.0.0-20210822032731-d228b6cf60f1 + go.arsenm.dev/infinitime v0.0.0-20210822201216-955384489609 golang.org/x/sys v0.0.0-20210820121016-41cdb8703e55 // indirect golang.org/x/text v0.3.7 // indirect ) diff --git a/go.sum b/go.sum index 844c319..eaa8492 100644 --- a/go.sum +++ b/go.sum @@ -287,8 +287,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.arsenm.dev/infinitime v0.0.0-20210822032731-d228b6cf60f1 h1:Upswvnt1AxTfd6eBnhI8nYA/OqUoKUGVBTMNqaPAd0o= -go.arsenm.dev/infinitime v0.0.0-20210822032731-d228b6cf60f1/go.mod h1:gaepaueUz4J5FfxuV19B4w5pi+V3mD0LTef50ryxr/Q= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= diff --git a/main.go b/main.go index 1c82c26..21749ee 100644 --- a/main.go +++ b/main.go @@ -56,7 +56,6 @@ func main() { // Connect to InfiniTime with default options dev, err := infinitime.Connect(&infinitime.Options{ AttemptReconnect: viper.GetBool("conn.reconnect"), - PairTimeout: infinitime.DefaultOptions.PairTimeout, }) if err != nil { log.Error().Err(err).Msg("Error connecting to InfiniTime") diff --git a/socket.go b/socket.go index 6a1c071..4cfdf48 100644 --- a/socket.go +++ b/socket.go @@ -272,6 +272,7 @@ func handleConnection(conn net.Conn, dev *infinitime.Device) { err = dev.DFU.Start() if err != nil { connErr(conn, err, "Error performing upgrade") + firmwareUpdating = false break } firmwareUpdating = false