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

Singleton of stomp-client as parameter #71

Open
Cupkek05 opened this issue Mar 16, 2018 · 0 comments
Open

Singleton of stomp-client as parameter #71

Cupkek05 opened this issue Mar 16, 2018 · 0 comments

Comments

@Cupkek05
Copy link

Cupkek05 commented Mar 16, 2018

Hey guys,
I posted my issue there https://stackoverflow.com/questions/49303927/create-a-singleton-of-stomp-client-and-pass-it-as-parameter
If someone got a solution, feel free to answer me please.

I simply created a connection by
const client = new Stomp(config) ;
client.connect(function(sessionId, err)); and tried to pass it as parameter to a manager
for instance : const myManager = new MyManager(client);
And use it into myManager :

function MyManager(client){
client.subscribe();
}

But I got the error "Not connected" on MyManager side.

What I did wrong ?

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