Page MenuHomePhabricator

D13792.diff
No OneTemporary

D13792.diff

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

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)

Event Timeline