Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33558801
D14387.1769094014.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14387.1769094014.diff
View Options
diff --git a/native/account/qr-auth/primary-device-qr-auth-context-provider.js b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
--- a/native/account/qr-auth/primary-device-qr-auth-context-provider.js
+++ b/native/account/qr-auth/primary-device-qr-auth-context-provider.js
@@ -6,6 +6,7 @@
import { useDebugLogs } from 'lib/components/debug-logs-context.js';
import { parseDataFromDeepLink } from 'lib/facts/links.js';
+import { useWaitForConnection } from 'lib/hooks/wait-for-connection.js';
import {
getOwnPeerDevices,
getKeyserverDeviceID,
@@ -61,6 +62,7 @@
const { addListener, removeListener, sendMessageToDevice } =
useTunnelbroker();
const { addLog } = useDebugLogs();
+ const waitForConnection = useWaitForConnection('tunnelbroker');
const identityContext = React.useContext(IdentityClientContext);
invariant(identityContext, 'identity context not set');
@@ -159,6 +161,7 @@
primaryDeviceID,
backupData,
});
+ await waitForConnection();
await sendMessageToDevice({
deviceID: targetDeviceID,
payload: JSON.stringify(message),
@@ -247,6 +250,7 @@
navigate,
runDeviceListUpdate,
sendMessageToDevice,
+ waitForConnection,
]);
const onConnect = React.useCallback(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 22, 3:00 PM (11 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5976711
Default Alt Text
D14387.1769094014.diff (1 KB)
Attached To
Mode
D14387: [native] wait for Tunnelbroker connection when adding secondary device
Attached
Detach File
Event Timeline
Log In to Comment