Skip to content

Commit dec162b

Browse files
committed
fix(stream): listen to aborted stream
1 parent 546b81d commit dec162b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ function proxy (req, res, head, {
155155
.on('finish', onFinish)
156156
} else {
157157
req
158-
.on('aborted', onFinish)
159158
.on('close', onFinish)
160159
res
161160
.on('finish', onFinish)
@@ -164,6 +163,7 @@ function proxy (req, res, head, {
164163
}
165164

166165
req
166+
.on('aborted', onFinish)
167167
.on('error', onFinish)
168168
.pipe(proxyReq)
169169
.on('error', onFinish)

0 commit comments

Comments
 (0)