Page MenuHomePhabricator

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

Authored by ashoat on Oct 10 2023, 6:44 AM.
Tags
None
Referenced Files
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
Unknown Object (File)
Fri, Nov 1, 12:05 PM
Unknown Object (File)
Fri, Nov 1, 12:05 PM
Unknown Object (File)
Fri, Nov 1, 11:44 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable