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

How to reset sockets? #139

Open
burakkilic opened this issue Mar 14, 2016 · 0 comments
Open

How to reset sockets? #139

burakkilic opened this issue Mar 14, 2016 · 0 comments

Comments

@burakkilic
Copy link

Hello;

I have following service in my code:

getSocket: function(shopId) {
        var ioWebSocket = io.connect($location.protocol() + '://' + $location.host() + ':' + $location.port() + '/web', {
            query: "shop=" + shopId
        });
        var mySocket = socketFactory({
            ioSocket: ioWebSocket
        });
        mySocket.forward('feedback');
        mySocket.forward('order');
        mySocket.forward('deviceCount');
        return mySocket;
    }

Here shops can be changed. But whenever I call getSocket service, it returns me same socket. It should be disconnect from one socket and connect to another one but it does not. How can I solve that?

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

No branches or pull requests

1 participant