stomp-js / stomp-websocket

Stomp client for Web browsers and node.js apps
https://stomp-js.github.io/stomp-websocket/
Apache License 2.0
141 stars 36 forks source link

Exception when debug function is not defined #20

Closed aalbericio closed 6 years ago

aalbericio commented 6 years ago

If you use this library setting debug=null (I don't want a debug function at all), reconnections will throw an Exception and your application may become unstable:

Line: @debug("STOMP: scheduling reconnection in #{@reconnect_delay}ms")

Should become something like: @debug?("STOMP: scheduling reconnection in #{@reconnect_delay}ms")

This bug also affects the JS and minified version, of course.

If you could, please, fix it.

Thanks for your dedication and work.

kum-deepak commented 6 years ago

Will fix it, need few days.

kum-deepak commented 6 years ago

Released version 4.0.1, please check if the issue is fixed.

aalbericio commented 6 years ago

How do you want me to check that? npm install stompjs@4.0.1 is not released...

aalbericio commented 6 years ago

Verified.

I installed the 4.0.1 tag version and pointed to that version in our package.json file.

The Exception is gone.

Thanks

kum-deepak commented 6 years ago

Thanks, will close the issue.

kum-deepak commented 6 years ago

Planning for next version of stompjs is on the way. Your participation will be really appreciated, please join at https://github.com/stomp-js/stompjs/issues/1