Skip to content

Commit 8a543aa

Browse files
committed
fix: revert PromptTOTPProvider sheet pattern to avoid deadlock
1 parent beaba84 commit 8a543aa

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

TablePro/Core/SSH/Auth/PromptTOTPProvider.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ internal final class PromptTOTPProvider: TOTPProvider, @unchecked Sendable {
4444
alert.accessoryView = textField
4545
alert.window.initialFirstResponder = textField
4646

47-
if let window = NSApp.keyWindow {
48-
var sheetResponse: NSApplication.ModalResponse = .cancel
49-
alert.beginSheetModal(for: window) { response in
50-
sheetResponse = response
51-
NSApp.stopModal()
52-
}
53-
NSApp.runModal(for: alert.window)
54-
return sheetResponse == .alertFirstButtonReturn ? textField.stringValue : nil
55-
}
56-
5747
let response = alert.runModal()
5848
return response == .alertFirstButtonReturn ? textField.stringValue : nil
5949
}

0 commit comments

Comments
 (0)