Skip to content

Commit 6119997

Browse files
committed
https-proxy-agent: remove dead "end"-emitting code
1 parent bf9fd03 commit 6119997

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

https-proxy-agent.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,9 @@ function connect (req, _opts, fn) {
189189
// never?
190190
throw new Error('should not happen...');
191191
}
192-
buffers = null;
193192

194-
// XXX: not sure if forcing "end" here is appropriate, but otherwise the
195-
// socket never closes and the tests fail since the proxy server never shuts
196-
// down...
197-
/*
198-
if ('function' == typeof socket.onend) {
199-
socket.onend();
200-
} else {
201-
socket.emit('end');
202-
}
203-
*/
204-
//socket.destroy();
193+
// nullify the cached Buffer instance
194+
buffers = null;
205195
}
206196

207197
socket.on('error', onerror);

0 commit comments

Comments
 (0)