only send card inserted if sent insertcard before

This commit is contained in:
Michele Balistreri 2022-08-30 09:02:17 +02:00
parent c8b38fe24a
commit 16f37cb459

View File

@ -201,8 +201,11 @@ func (f *KeycardFlow) connect() (*keycardContext, error) {
return nil, restartErr()
}
t.Stop()
f.state = Running
signal.Send(CardInserted, FlowStatus{})
if f.state == Paused {
f.state = Running
signal.Send(CardInserted, FlowStatus{})
}
return kc, nil
case <-t.C:
f.pause(InsertCard, ErrorConnection, FlowParams{})