Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3356727
D13792.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13792.diff
View Options
diff --git a/lib/tunnelbroker/peer-to-peer-message-handler.js b/lib/tunnelbroker/peer-to-peer-message-handler.js
--- a/lib/tunnelbroker/peer-to-peer-message-handler.js
+++ b/lib/tunnelbroker/peer-to-peer-message-handler.js
@@ -32,7 +32,7 @@
function PeerToPeerMessageHandler(props: Props): React.Node {
const { socketSend, getSessionCounter, doesSocketExist } = props;
- const { addListener, removeListener } = useTunnelbroker();
+ const { addListener, removeListener, socketState } = useTunnelbroker();
const peerToPeerMessageHandler = usePeerToPeerMessageHandler();
const handleOlmMessageToDevice = useHandleOlmMessageToDevice();
const persistedStateLoaded = usePersistedStateLoaded();
@@ -104,7 +104,10 @@
socketSend,
],
);
- const { enqueue } = useActionsQueue(processItem, persistedStateLoaded);
+ const { enqueue } = useActionsQueue(
+ processItem,
+ persistedStateLoaded && !!socketState.isAuthorized,
+ );
const tunnelbrokerMessageListener = React.useCallback(
async (message: TunnelbrokerToDeviceMessage) => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 8:16 PM (9 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577223
Default Alt Text
D13792.diff (1 KB)
Attached To
Mode
D13792: [lib] Wait with processing inbound messages for Tunnelbroker connection
Attached
Detach File
Event Timeline
Log In to Comment