Page MenuHomePhabricator

[lib] Call logout when connectionIssue is set
ClosedPublic

Authored by inka on Dec 14 2023, 4:21 AM.
Tags
None
Referenced Files
F3356126: D10331.id34871.diff
Sat, Nov 23, 5:01 PM
F3355834: D10331.id34625.diff
Sat, Nov 23, 3:47 PM
F3355813: D10331.id34899.diff
Sat, Nov 23, 3:37 PM
F3355157: D10331.diff
Sat, Nov 23, 2:01 PM
Unknown Object (File)
Sun, Nov 17, 8:32 AM
Unknown Object (File)
Thu, Nov 7, 11:19 PM
Unknown Object (File)
Oct 20 2024, 7:45 PM
Unknown Object (File)
Oct 20 2024, 1:18 AM
Subscribers

Details

Summary

issue: https://linear.app/comm/issue/ENG-5914/stop-calling-logout-from-socket
See this comment. We want to stop calling logout from the Socket, and instead set conneciotnIssue. But for the time baing we will log the user out from KeyserverConnectionHandler if connectionIssue was set. This will be updated in the future to instead retry the keyserver from time to time.

Test Plan

Dispatched the setConnectionIssueActionTypes, checked that the user is logged out.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

inka requested review of this revision.Dec 14 2023, 4:39 AM
This revision is now accepted and ready to land.Dec 14 2023, 9:40 AM
ashoat requested changes to this revision.Dec 15 2023, 10:09 AM

Glad I caught this – @inka and @ginsu, please be more careful next time

lib/components/keyserver-connection-handler.js
28

We should not be calling this inline during a component render. Is this supposed to be in an effect?

This revision now requires changes to proceed.Dec 15 2023, 10:09 AM
tomek added inline comments.
lib/components/keyserver-connection-handler.js
23–31 ↗(On Diff #34825)

It might be possible that one connection issue is overridden by another - in that case, we would dispatch a logout twice. To avoid that, we should select a boolean telling if there's a connection issue.

This revision is now accepted and ready to land.Dec 19 2023, 6:44 AM

Update due to update in D10287