Skip to content

Conversation

@imaPheven
Copy link

Receiving error:

TypeError: Cannot read property 'removeAllListeners' of null

Root Cause:
socket.on("close") is raised after failing to login. Detach is called but socket is null.

Remediation:
check if socket is not null before removing listeners

on error, the detach method is being called and when the close event is raised from _tls_wrap, it calls detach but the socket is already detached and is null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant