mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-24 08:41:31 +00:00
Merge pull request #290 from alibaba/write-after-end
fix the "write after end" error when in stream mode
This commit is contained in:
commit
87c4eeec94
@ -159,7 +159,7 @@ function fetchRemoteResponse(protocol, options, reqData, config) {
|
||||
|
||||
res.on('end', () => {
|
||||
if (resDataStream) {
|
||||
resDataStream.emit('end'); // EOF
|
||||
resDataStream.push(null); // indicate the stream is end
|
||||
} else {
|
||||
finishCollecting();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user