diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 329914f9..4130b969 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - node-version: [6.x, 8.x, 10.x, 12.x] + node-version: [6.x, 8.x, 10.x, 12.x, 14.x] runs-on: ${{ matrix.os }} diff --git a/src/agent.ts b/src/agent.ts index 04cc1e7b..f2014adc 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -162,7 +162,7 @@ export default class HttpsProxyAgent extends Agent { // See: https://hackerone.com/reports/541502 socket.destroy(); - const fakeSocket = new net.Socket(); + const fakeSocket = new net.Socket({ writable: false }); fakeSocket.readable = true; // Need to wait for the "socket" event to re-play the "data" events.