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