node-stomp-client icon indicating copy to clipboard operation
node-stomp-client copied to clipboard

Error Callback

Open tamsler opened this issue 12 years ago • 2 comments

How does the client get notified, when the server connection goes down? I have defined the "errorCallback" in:

stomp.connect([callback, [errorCallback]])

but it never gets called if the server goes down.

tamsler avatar Jul 29 '13 23:07 tamsler

Have you tried to listen for 'disconnect' event?

sam-github avatar Jul 07 '14 20:07 sam-github

I've run into this same problem. My current workaround is to directly access the stream within the stomp client and bind to the 'end' event.

client.stream.on('end', errorCallback);

ahudak avatar Mar 10 '15 18:03 ahudak