Page MenuHomePhabricator

[keyserver] Avoid "WebSocket is not open" error
ClosedPublic

Authored by ashoat on Oct 10 2023, 6:44 AM.
Tags
None
Referenced Files
F3383719: D9443.diff
Thu, Nov 28, 5:24 PM
Unknown Object (File)
Mon, Nov 25, 5:21 AM
Unknown Object (File)
Mon, Nov 25, 4:51 AM
Unknown Object (File)
Wed, Nov 20, 4:39 PM
Unknown Object (File)
Wed, Nov 20, 4:39 PM
Unknown Object (File)
Wed, Nov 20, 4:37 PM
Unknown Object (File)
Wed, Nov 20, 4:18 PM
Unknown Object (File)
Fri, Nov 1, 12:05 PM
Subscribers

Details

Summary

Linear issue: ENG-5177

This error is not really causing any problems. That said, its appearance can be considered a regression caused by D9298.

Before that diff, the check on this.ws.readyState at the start of sendMessage prevented the error. After that diff, there was a possibility of this.ws.readyState changing after the compression step.

This diff addresses the regression by introducing a second check after the compression step.

Test Plan

To be honest, this would be fairly expensive to test compared to the cost of making the diff, and the priority of the issue it's addressing. I think the diff is fairly safe... relying on Flow and CI to catch any issues.

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/socket-not-open
Lint
No Lint Coverage
Unit
No Test Coverage