Skip to content

Commit

Permalink
Merge branch 'master' into fix/bind-join-button-on-recall
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbuks committed Oct 17, 2023
2 parents 4d8e7a0 + 419efa5 commit e908260
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions actions/websocket_actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,6 @@ export async function reconnect(socketId) {

dispatch(loadChannelsForCurrentUser());

dispatch(resetReloadPostsInChannel());

if (mostRecentPost) {
// eslint-disable-next-line no-console
console.log('[websocket_actions] dispatch syncPostsInChannel');
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export default class WebSocketClient {
this.conn.connection.bind('state_change', (states: { current: string; previous: string }) => {
console.log('[websocket] current state is: ', states.current);

if (states.current === 'unavailable' || states.current === 'failed') {
if (states.current === 'unavailable' || states.current === 'failed' || (states.previous === 'connected' && states.current === 'connecting')) {
this.connectFailCount++;
console.log('[websocket] connectFailCount updated: ', this.connectFailCount);

Expand Down

0 comments on commit e908260

Please sign in to comment.