Skip to content

Commit

Permalink
[identity] use identitySearchSocket instead of socket.current
Browse files Browse the repository at this point in the history
Summary:
This addresses https://linear.app/comm/issue/ENG-9971/[error-invalid-state-err]-in-identitysearchprovider

We should be using identitySearchSocket instead of socket.current could be null before we properly set it

Test Plan:
cargo check

Didn't get to testing this properly. Putting up this diff for now to get it into review, but I'll ensure we're not getting spammed with:
```
ERROR  [Error: INVALID_STATE_ERR]
```
before landing

Reviewers: kamil, varun, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D14094
  • Loading branch information
wyilio committed Dec 7, 2024
1 parent b1a937b commit 379d857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/identity-search/identity-search-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function IdentitySearchProvider(props: Props): React.Node {
const heartbeat: Heartbeat = {
type: identitySearchMessageToServerTypes.HEARTBEAT,
};
socket.current?.send(JSON.stringify(heartbeat));
identitySearchSocket.send(JSON.stringify(heartbeat));
}
};

Expand Down

0 comments on commit 379d857

Please sign in to comment.