Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: rearranged the order of statements inside the cleanup function #2556

Merged
merged 1 commit into from
Jan 20, 2023

Conversation

BiswaViraj
Copy link
Contributor

What change does this PR introduce?

Why was this change needed?

inside use-socket-controller.ts useEffect

return () => {
     socket = null;
     socket?.disconnect();
};

the order of statements were wrong
socket.disconnect should be invoked before setting it to null

Other information (Screenshots)

@linear
Copy link

linear bot commented Jan 20, 2023

@BiswaViraj BiswaViraj merged commit 889842d into next Jan 20, 2023
@BiswaViraj BiswaViraj deleted the nv-1555-websocket-sends-2-disconnection-requests branch January 20, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants