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

/lib/s3.js putFile throws { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' } #191

Closed
bitliner opened this issue Jul 13, 2013 · 5 comments

Comments

@bitliner
Copy link

i'm using grunt-s3 to upload files to s3.
When the function putFile of lib/s3.js of knox module is called, it throws

{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }

@bitliner
Copy link
Author

with node-v0.10.12

@domenic
Copy link
Contributor

domenic commented Jul 13, 2013

You should not forget to attach 'error' handlers to the request object returned from putFile.

@bitliner
Copy link
Author

@domenic putFile doesn't return anything.
The req object, returned by self.putStream(), has a callback, whose error is that displayed above.

@bitliner
Copy link
Author

Sometimes the syscall specified in the error is 'write' instead of 'read'

domenic added a commit that referenced this issue Jul 13, 2013
@domenic
Copy link
Contributor

domenic commented Jul 13, 2013

You are partially right. It does return an event emitter, but the event emitter was not getting errors forwarded to it from the underlying request.

With the upcoming release errors will be trapped and either forwarded to your callback if the callback hasn't been called yet, or forwarded to the returned event emitter if it has been called.

Also relevant: the discussion in #114, about whether you should have to listen to these errors at all or if we should maybe just swallow them if you get a second error after having already called you back with an error or result.

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

No branches or pull requests

2 participants