Skip to content

Commit cdf39f5

Browse files
committed
fix: properly check upstream status
1 parent b3f26a3 commit cdf39f5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ function fastProxy(opts = {}) {
8888
request: reqOpts
8989
}
9090
request(reqParams, (err, response) => {
91-
if (res.socket.destroyed) {
91+
if (res.socket.destroyed || res.writableEnded) {
9292
return
93-
}
93+
}
9494

9595
if (err) {
9696
if (err.code === 'ECONNREFUSED') {

0 commit comments

Comments
 (0)