Callback fired twice in src/braintree/http.coffee
See original GitHub issueYesterday I had an issue where the callback in http.coffee fires twice.
https://github.com/braintree/braintree_node/blob/master/src/braintree/http.coffee#L59-L91
One callback happens when the http client’s setTimeout
function fires. The other happens in the error event handler when the socket closes.
Should this library be responsible for firing the callback only once?
I noticed there is a non running test here, https://github.com/braintree/braintree_node/blob/master/spec/integration/braintree/http_spec.coffee#L52-L64
Has anyone else experienced the double callback?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
JQuery ajax success fired twice, because of .done callback
Now, the above code fires the success handler for the request twice, but's its been there for more than a year & no...
Read more >Preventing callbacks from accidentally being called twice
When we run the example above, and the url is cached, the callback is actually called twice! It's easy to think of calling...
Read more >Contract.new callback being called twice. · Issue #500 - GitHub
The fact that a callback is fired twice is just wrong. The very definition of callback is, that is called exactly once.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Changes to address this have been released in
1.38.0
. Closing for now, but feel free to reopen if this does not address the issue. https://github.com/braintree/braintree_node/commit/c74ae1210a7437d4955fd33d3fb1f6811a98f39cThanks for reporting this, @wlaurance!
Hey @wlaurance
We looked into this today and this does seem to be an issue. We’re going to look into this further.