| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bf4d074 commit 29c395d
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -277,6 +277,7 @@ function installListeners(agent, s, options) { | |||
| 277 | 277 | s.removeListener('close', onClose); | |
| 278 | 278 | s.removeListener('free', onFree); | |
| 279 | 279 | s.removeListener('agentRemove', onRemove); | |
| 280 | + s._httpMessage = null; | ||
| 280 | 281 | } | |
| 281 | 282 | s.on('agentRemove', onRemove); | |
| 282 | 283 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,6 +49,10 @@ server.listen(0, common.mustCall(() => { | |||
| 49 | 49 | path: 'google.com:443' | |
| 50 | 50 | }, common.mustNotCall()); | |
| 51 | 51 | ||
| 52 | + req.on('socket', common.mustCall((socket) => { | ||
| 53 | + assert.strictEqual(socket._httpMessage, req); | ||
| 54 | + })); | ||
| 55 | + | ||
| 52 | 56 | req.on('close', common.mustCall()); | |
| 53 | 57 | ||
| 54 | 58 | req.on('connect', common.mustCall((res, socket, firstBodyChunk) => { | |
@@ -60,6 +64,7 @@ server.listen(0, common.mustCall(() => { | |||
| 60 | 64 | // Make sure this socket has detached. | |
| 61 | 65 | assert(!socket.ondata); | |
| 62 | 66 | assert(!socket.onend); | |
| 67 | + assert.strictEqual(socket._httpMessage, null); | ||
| 63 | 68 | assert.strictEqual(socket.listeners('connect').length, 0); | |
| 64 | 69 | assert.strictEqual(socket.listeners('data').length, 0); | |
| 65 | 70 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments