From 912d6ffe8bb58c5d9bdb8e4013216354063097af Mon Sep 17 00:00:00 2001 From: Jens Utbult Date: Thu, 17 Oct 2024 15:58:22 +0200 Subject: [PATCH] Make sure to set the connectionController to nil when the smart card is removed, otherwise the connection state will not be corect when the delegate is being called. --- .../Connections/SmartCardConnection/YKFSmartCardConnection.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/YubiKit/YubiKit/Connections/SmartCardConnection/YKFSmartCardConnection.m b/YubiKit/YubiKit/Connections/SmartCardConnection/YKFSmartCardConnection.m index d9b5144c..22c74f1a 100644 --- a/YubiKit/YubiKit/Connections/SmartCardConnection/YKFSmartCardConnection.m +++ b/YubiKit/YubiKit/Connections/SmartCardConnection/YKFSmartCardConnection.m @@ -70,8 +70,8 @@ - (void)updateConnections API_AVAILABLE(ios(16.0)) { } }]; } else if (self.connectionController != nil) { - [self.delegate didDisconnectSmartCard:self error:nil]; self.connectionController = nil; + [self.delegate didDisconnectSmartCard:self error:nil]; [self.currentSession clearSessionState]; self.currentSession = nil; }