diff --git a/src/integration/proxy/sequencer.go b/src/integration/proxy/sequencer.go index 8939359..93c101b 100644 --- a/src/integration/proxy/sequencer.go +++ b/src/integration/proxy/sequencer.go @@ -217,7 +217,11 @@ func (sq *Sequencer) handleInputInteraction(cf ActionConfirmFrom, msg wire.Messa func (sq *Sequencer) handleFirstCommandResponse(cf ActionConfirmFrom, successMsgKind messages.MessageType, commandName string, err error, msg wire.Message) (wire.Message, error) { if err != nil { - sq.log.WithError(err).Errorln(commandName + ": sending message failed") + if err == skywallet.ErrNoDeviceConnected { + //sq.log.WithError(err).Infoln(commandName + ": sending message failed") + } else { + sq.log.WithError(err).Errorln(commandName + ": sending message failed") + } return wire.Message{}, err } for msg.Kind != uint16(successMsgKind) && msg.Kind != uint16(messages.MessageType_MessageType_Failure) { diff --git a/src/skywallet/helper.go b/src/skywallet/helper.go index e56cff5..b26b0d1 100644 --- a/src/skywallet/helper.go +++ b/src/skywallet/helper.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "runtime" + "strings" "sync" "time" @@ -207,6 +208,9 @@ func sendToDevice(dev usb.Device, chunks [][64]byte) (wire.Message, error) { msg, err = wire.ReadFrom(dev) if err != nil { + if strings.Contains(err.Error(), "read: connection refused") { + return wire.Message{}, ErrNoDeviceConnected + } return wire.Message{}, err }