Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3103959
D13792.id45449.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.id45449.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
Thu, Oct 31, 2:30 PM (20 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2392560
Default Alt Text
D13792.id45449.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