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)
Sun, Sep 15, 1:15 PM
Unknown Object (File)
Sun, Sep 15, 1:15 PM
Unknown Object (File)
Sun, Sep 15, 1:13 PM
Unknown Object (File)
Sun, Sep 15, 12:53 PM
Unknown Object (File)
Fri, Sep 13, 8:09 AM
Unknown Object (File)
Wed, Aug 28, 8:38 PM
Unknown Object (File)
Wed, Aug 28, 9:38 AM
Unknown Object (File)
Mon, Aug 26, 5:33 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable