Page MenuHomePhabricator

[web/native/lib] Combine openSocketSelector from web and native
ClosedPublic

Authored by michal on Dec 12 2023, 3:47 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 5:36 AM
Unknown Object (File)
Sat, Nov 9, 5:22 PM
Unknown Object (File)
Fri, Nov 8, 10:02 PM
Unknown Object (File)
Fri, Nov 8, 7:18 PM
Unknown Object (File)
Fri, Nov 8, 7:18 PM
Unknown Object (File)
Fri, Nov 8, 7:18 PM
Unknown Object (File)
Oct 6 2024, 9:51 AM
Unknown Object (File)
Oct 3 2024, 8:30 AM
Subscribers

Details

Summary

ENG-6043

Should have been done when web cookies were migrated to redux, but I haven't noticed this code then. Now that cookies are in redux on all platforms we can merge these two functions.

Test Plan

Tested that web app still works fine (logging in, out, navigation, sending messages). It's hard to test the of cookie change restarts the websocket because web can't really recover from cookies changes and it just causes a logout.

Diff Detail

Repository
rCOMM Comm
Branch
michal/eng-6043
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
lib/selectors/socket-selectors.js
37–42

This behavior wasn't present on the web and now we're introducing it. Is it a good idea to do so?

This revision is now accepted and ready to land.Dec 13 2023, 4:51 AM
lib/selectors/socket-selectors.js
37–42

I can't think of a situation where we wouldn't want this behaviour. If the cookie changes we should update the websocket connection so everything is in sync. Now that cookies on web are in redux we should try and treat it uniformly.