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

Changed EventEmitter inheritens to Node0.10 style. #113

Merged
merged 1 commit into from
Aug 29, 2013
Merged

Changed EventEmitter inheritens to Node0.10 style. #113

merged 1 commit into from
Aug 29, 2013

Conversation

eric-wieser
Copy link

This fixes #110, and fixes #112

@@ -25,6 +26,7 @@ function mixin(target, source) {
}

function Request(uri, options) {
events.EventEmitter.call(this);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"call" is not part of EventEmitter in the current 0.10.x version. Not adding this line removes the error and overall this appears to have fixed the multiple result calls

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is - that's Function.prototype.call

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of "call" is not necessary.

@mortizbey
Copy link

This fixes all the multiple result calls!! When is someone going to accept the merge?

@tobiastraxel
Copy link

Thanks for the fix - it solved my issue and works.

@taxilian
Copy link

+1 -- is this going to be accepted so we can use the npm version again?

@mortizbey
Copy link

+1 @taxilian

@gastongarcia
Copy link

+1 Yeah the npm version generates this error when deplying on Heroku:

possible EventEmitter memory leak detected

@cressie176
Copy link

Eric's patch works for me. It's a tiny change. +1 for accepting the pull

@gastongarcia
Copy link

I changed the source with Eric's code and it worked on Heroku.

+1 for accepting it.

@drewp
Copy link

drewp commented Jun 2, 2013

Also worked for me with nodejs v0.10.3. People who want to try Eric's fix now might enjoy this package.json dependencies line:

    "restler": "git://github.com/eric-wieser/restler.git#8a2ca18a8e942cd8dd85046bf7bb1a0ddf4cc1f9"

@korvus81
Copy link

korvus81 commented Jun 3, 2013

Using the dependency line for Eric's repo solves this issue for me as well. Running node v0.10.9.

@alexzorin
Copy link

Thanks @drewp, that will have to do for now (running v0.10.10). +1 to merge.

@nicStuff
Copy link

Seems a pretty important problem on affected versions of node: while my application is running and the listener "hooking" gets reached, I add a listener without the chance to remove it.

UP for having it "officially" on NPM.

@StevenEWright
Copy link

+1 This library is broken without this.

@rodmaykel
Copy link

+1

@young-steveo
Copy link

+1. I was debugging my own code for hours, thinking I had some kind of logic bug, but it turns out the bug is in restler. This pull request fixed it for me.

@dlau
Copy link

dlau commented Jul 24, 2013

I was having some really strange behavior occurring while calling on('complete'...) within an async call under node 0.10.x, this fixed it for me too.

+1ing for merge into master

@ekyo
Copy link

ekyo commented Aug 26, 2013

This issue is still happening, a merge would be nice

@ekyo ekyo mentioned this pull request Aug 26, 2013
@gasteve
Copy link

gasteve commented Aug 29, 2013

Uggg...wasted a lot of time because of this issue. Please fix it.

danwrong added a commit that referenced this pull request Aug 29, 2013
Changed EventEmitter inheritens to Node0.10 style.
@danwrong danwrong merged commit 9d455ff into danwrong:master Aug 29, 2013
@StevenEWright
Copy link

Nice!

@eric-wieser eric-wieser deleted the fixed-inheritance branch August 29, 2013 20:51
@crtag
Copy link

crtag commented Sep 6, 2013

Would be nice to have npm registry updated as well.

@nicStuff
Copy link

Yes, it would be great also to know what restler npm version will include this fix (and would be even greater if this will happen shortly ;)). Thanks for your work!

@smithkyle
Copy link

This would have saved me about 8 hours of work if it was in npm and I hadn't had to track it down here....

With that said, SO glad I found this for my sanity's sake.

@Reggino
Copy link

Reggino commented Oct 7, 2013

@danwrong Thanks! Could you please publish a new version to npm?

@young-steveo
Copy link

@danwrong This is fantastic! 👍 Can't wait for the NPM update. 😄

suprememoocow added a commit to troupe/restler-q that referenced this pull request Nov 4, 2013
@tobinharris
Copy link

Noob question - how do I get this fix please guys? :)

"restler": "git://github.com/eric-wieser/restler.git#9d455ff14c57ddbe263dbbcd0289d76413bfe07d"

Doesn't seem to be working.

@cendrizzi
Copy link

Yeah, that link no longer works. This needs to be forked perhaps and a new npm project that updates. It's silly that the npm package isn't getting updated.

@cendrizzi
Copy link

"git+http://github.com/danwrong/restler.git" worked for me. Mind you this is scary to use since it's not a point in time. An npm bump is what is really needed here.

@eric-wieser
Copy link
Author

@tobinharris: I deleted that fork since it's now been merged into master

@tobinharris
Copy link

Thansks @eric-wieser / @cendrizzi.

So, I'll just point at master for now.

T

@Danita
Copy link

Danita commented Dec 6, 2013

Any word on this? I just have discovered this after 3 hours of debugging. Is there any chance the npm package will be updated?

@easternbloc
Copy link
Collaborator

I'm trying to get owner access on npm. Once I've done that I'll push up a new version and try my best at keeping things updated.

@mortizbey
Copy link

Let us know so that we can change our references.

@easternbloc
Copy link
Collaborator

Will do!

@alexbudin
Copy link

Any news on this?

@easternbloc
Copy link
Collaborator

3.1.0 is out now!!!

@easternbloc
Copy link
Collaborator

@alexbudin
Copy link

For some reason i am still getting the same issue. I will delete the module manually and install it again

@alexbudin
Copy link

Updated to latest module, i have the same issue, the complete events are bubbling up.

Can someone help me with a temporary fix?

@alexbudin
Copy link

Its all good. It decide to work for some reason.

Thank you.

@nicStuff
Copy link

@easternbloc Great man, all right now on node 0.10.1. You brought back this library to its shine.

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

Successfully merging this pull request may close these issues.

success and failure events fire too often Invalid behaviour on Node.js v0.10.0