Details
Details
- Comment out code in removeInboundP2PMessages() function
- Send some messages
- Now getAllInboundP2PMessages() should always return something
- Restart the app
- Verify that:
- before the patch in the logs there are errors like "Error while sending confirmation: Tunnelbroker not connected [Error: Tunnelbroker not connected]"
- after the patch the errors should disappear
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
I would prefer a slightly different approach, where we could read Inbound messages and add them to the queue, there is no point in deffering this - but instead wait with actual processing, to achieve that we might need to modify useActionsQueue to be able to conditionally start processing, what do you think?
Additionally, this could mitigate ENG-9713 - when there is no TB connection, we won't decrypt message which could not be confirmed to Tunnelbroker.
Requesting to discuss this - but I am open to accepting this too if you think what I suggested has some drawbacks.
lib/tunnelbroker/peer-to-peer-message-handler.js | ||
---|---|---|
109 ↗ | (On Diff #45449) | shouldn't we memoize it? |
lib/tunnelbroker/peer-to-peer-message-handler.js | ||
---|---|---|
109 ↗ | (On Diff #45449) | I don't think there's any point to memoizing this. There are two reasons for memoizing something in React using useMemo:
|
lib/tunnelbroker/peer-to-peer-message-handler.js | ||
---|---|---|
109 ↗ | (On Diff #45449) | Ahh right, sorry for confusing |