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

StompClient Disconnection. #10

Closed
karibandi opened this issue Dec 20, 2017 · 2 comments
Closed

StompClient Disconnection. #10

karibandi opened this issue Dec 20, 2017 · 2 comments
Labels

Comments

@karibandi
Copy link

I have been using your stomp client library for a while and its working great ,but the only problem i'm facing is disconnecting the stomp , I've tried calling the
"stompClientDidDisconnect()" and "stompClientWillDisconnect()", where even after unsubscribing the topic i'm still getting the hits from server, Could you please help with the issue?.

@WrathChaos
Copy link
Owner

Hey Karibandi,
Have you called "stopClientDidDisconnect(client: socketClient)" ?
Example :

 func stompClientDidDisconnect(client: StompClientLib!) {
        if socketClient.isConnected(){
            socketClient.unsubscribe(destination: topic!)
            socketClient.disconnect()
            print("Socket is Disconnected")
        }
    }

@karibandi
Copy link
Author

No, i tried calling the same with out that if condition ,now i have tried the above code and it is working like a charm.
Thanks Kuray.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants