Extended message timeout and modified the reconnect function. (#2234)

Modify the reconnect function to set a default connection timeout of 1500 milliseconds.
This commit is contained in:
kazutoiris 2024-06-16 15:50:38 +08:00 committed by GitHub
parent f673a2d4ee
commit be74ac2474
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -806,10 +806,10 @@ keepass.disableAutomaticReconnect = function() {
keepass.reconnectLoop = null;
};
keepass.reconnect = async function(tab, connectionTimeout) {
keepass.reconnect = async function(tab = null, connectionTimeout = 1500) {
keepassClient.connectToNative();
keepass.generateNewKeyPair();
const keyChangeResult = await keepass.changePublicKeys(tab, true, connectionTimeout).catch(() => false);
const keyChangeResult = await keepass.changePublicKeys(tab, !!connectionTimeout, connectionTimeout).catch(() => false);
// Change public keys timeout
if (!keyChangeResult) {