Skip to content

Commit

Permalink
add error to sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Amin Nami committed Jun 6, 2023
1 parent 780ae61 commit 9ee7fe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Device.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (dev *Device) syncTimeOffset() {

ct := time.Now().UTC()
if httpReply, err := dev.CallMethod(getDateTime); err != nil {
log.Println("couldn't sync")
log.Println("couldn't sync ", err)
} else {
bo := &Envelope{}
b, err := io.ReadAll(httpReply.Body)
Expand All @@ -379,6 +379,7 @@ func (dev *Device) syncTimeOffset() {
)

dev.timeOffset = *timeOffsetCalculator(st, ct)
log.Println("sync")
}

time.Sleep(5 * time.Second)
Expand Down

0 comments on commit 9ee7fe2

Please sign in to comment.