Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33266947
D14390.1768624562.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D14390.1768624562.diff
View Options
diff --git a/lib/actions/user-actions.js b/lib/actions/user-actions.js
--- a/lib/actions/user-actions.js
+++ b/lib/actions/user-actions.js
@@ -35,6 +35,7 @@
import {
permissionsAndAuthRelatedRequestTimeout,
callIdentityServiceTimeout,
+ logoutTimeout,
} from '../shared/timeouts.js';
import {
PeerToPeerContext,
@@ -136,10 +137,14 @@
try {
response = await promiseWithTimeout(
callKeyserverEndpoint('log_out', requests),
- 500,
+ logoutTimeout,
'keyserver log_out',
);
- } catch {}
+ } catch (e) {
+ console.log(
+ `Failed keyserver logout: ${getMessageForException(e) ?? ''}`,
+ );
+ }
const currentUserInfo = response ? loggedOutUserInfo : null;
return { currentUserInfo, preRequestUserState, keyserverIDs };
};
@@ -172,7 +177,11 @@
const holdersPromise = (async () => {
try {
await removeAllHolders();
- } catch {}
+ } catch (e) {
+ console.log(
+ `Removing holders failed: ${getMessageForException(e) ?? ''}`,
+ );
+ }
})();
const identityPromise = (async () => {
@@ -223,10 +232,16 @@
try {
await promiseWithTimeout(
callIdentityClientLogOut(),
- 500,
+ logoutTimeout,
logOutType + ' identity log_out',
);
- } catch {}
+ } catch (e) {
+ console.log(
+ `Failed to call identity client logout: ${
+ getMessageForException(e) ?? ''
+ }`,
+ );
+ }
})();
const [{ keyserverIDs: _, ...result }] = await Promise.all([
@@ -308,10 +323,12 @@
try {
await promiseWithTimeout(
identityClient.logOut(),
- 500,
+ logoutTimeout,
'identity log_out',
);
- } catch {}
+ } catch (e) {
+ console.log(`Identity logout failed: ${getMessageForException(e) ?? ''}`);
+ }
return {
currentUserInfo: null,
preRequestUserState: {
@@ -468,7 +485,17 @@
const sendLogoutMessage = useSendLogoutMessageToPrimaryDevice();
return React.useCallback(async () => {
- await sendLogoutMessage();
+ try {
+ await promiseWithTimeout(
+ sendLogoutMessage(),
+ logoutTimeout,
+ 'send logout message',
+ );
+ } catch (e) {
+ console.log(
+ `Failed to send logout message: ${getMessageForException(e) ?? ''}`,
+ );
+ }
// log out of identity service, keyserver and visually
return logOut();
diff --git a/lib/shared/timeouts.js b/lib/shared/timeouts.js
--- a/lib/shared/timeouts.js
+++ b/lib/shared/timeouts.js
@@ -58,3 +58,5 @@
// Client-side timeout duration for certain identity service RPCs.
export const callIdentityServiceTimeout = 5000;
+
+export const logoutTimeout = 500;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 17, 4:36 AM (12 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5947147
Default Alt Text
D14390.1768624562.diff (2 KB)
Attached To
Mode
D14390: [lib] Add a timeout to Tunnelbroker message send during logout
Attached
Detach File
Event Timeline
Log In to Comment