From 0054a0b3cf4217a14a01a160868777fd01b4d879 Mon Sep 17 00:00:00 2001 From: Elara Musayelyan Date: Thu, 21 Oct 2021 20:27:58 -0700 Subject: [PATCH] Update infinitime library version to fix intermittent DFU issues --- go.mod | 2 +- go.sum | 4 ++-- socket.go | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index f99c115..f441f90 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/srwiley/oksvg v0.0.0-20210519022825-9fc0c575d5fe // indirect github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 // indirect github.com/yuin/goldmark v1.4.1 // indirect - go.arsenm.dev/infinitime v0.0.0-20211015072354-c101249d3e61 + go.arsenm.dev/infinitime v0.0.0-20211022031744-1dde7f9b07f6 golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d // indirect golang.org/x/net v0.0.0-20211011170408-caeb26a5c8c0 // indirect golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac // indirect diff --git a/go.sum b/go.sum index 7842c14..65525df 100644 --- a/go.sum +++ b/go.sum @@ -366,8 +366,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yuin/goldmark v1.3.8/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1 h1:/vn0k+RBvwlxEmP5E7SZMqNxPhfMVFEJiykr15/0XKM= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.arsenm.dev/infinitime v0.0.0-20211015072354-c101249d3e61 h1:PS0fYM1cwhuPY5zwszkZvLg+xNIr28sXZZiYl+TUZi4= -go.arsenm.dev/infinitime v0.0.0-20211015072354-c101249d3e61/go.mod h1:gaepaueUz4J5FfxuV19B4w5pi+V3mD0LTef50ryxr/Q= +go.arsenm.dev/infinitime v0.0.0-20211022031744-1dde7f9b07f6 h1:XXHdx/G0isWjfhDx9xPPTTjpXwywBk5WMECcMWLPCI0= +go.arsenm.dev/infinitime v0.0.0-20211022031744-1dde7f9b07f6/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/socket.go b/socket.go index 4f9f79d..5bbf835 100644 --- a/socket.go +++ b/socket.go @@ -227,6 +227,8 @@ func handleConnection(conn net.Conn, dev *infinitime.Device) { connErr(conn, err, "Error decoding request data") break } + // Reset DFU to prepare for next update + dev.DFU.Reset() switch reqData.Type { case types.UpgradeTypeArchive: // If less than one file, return error