btford / btford/angular-socket-io

What is the correct way to clean up (destroy) a socket

Open
#79 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.5k
Forks
225
PR merge metrics
No merged PRs in 30d

Description

I am trying to destroy the socket on $scope.$destroy, but I am still having sockets stack up when closing/opening a modal. I have tried socket.disconnect() but still see polling. I have been shutting the local socketio server to make sure that reconnect errors stop after the scope is destroyed but they continue and stack every time I re-open the modal.

What is the proper way to close/disconnect and dispose of sockets when leaving the modal/route where they were used?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.