HubSpot / messenger

Growl-style alerts and messages for your app. #hubspot-open-source
http://github.hubspot.com/messenger/
MIT License
4.02k stars 405 forks source link

handlers[type] run count increases on each timed retry #73

Open strongwazz opened 10 years ago

strongwazz commented 10 years ago

Hi There,

I'm not sure if this is an issue, but just something I noticed.

Inside .run() where the handlers[type] is returned, it appears that that function is being called 1 extra time for each time the message retries after waiting for its delay.

originalHandler = opts[type];
        return handlers[type] = function() {
          var data, defaultOpts, handlerResp, msgOpts, reason, resp, responseOpts, xhr, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;

          console.log("I'll appear more and more after each failed ajax 500...");

          resp = 1 <= arguments.length ? __slice.call(arguments, 0) : [];

Anywho, like I said, Im not sure if it's an issue. If the browser is left open, and left to retry over the space of an hour, I get hundreds of I'll appear more and more after each failed ajax 500 after EACH failed ajax request

Thanks