forwardemail / forwardemail/superagent

stream.pipe(request) Error: socket hang up

Open
#1,317 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Hi:
I have a problem,
code:
```
var stream = fs.createWriteStream(path.join(__dirname, './test.json'));
request = new Request(method, url);
stream.pipe(request);
```
Upload about 100 K file no problem
But there will be a mistake in more than 200 K

Error is
```
{ Error: socket hang up
at createHangUpError (_http_client.js:254:15)
at Socket.socketCloseListener (_http_client.js:286:23)
at emitOne (events.js:101:20)
at Socket.emit (events.js:188:7)
at TCP._handle.close [as _onclose] (net.js:498:12) code: 'ECONNRESET', response: undefined }
```
After the examination, no problems were found, can you help me?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.