| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 37a546b commit 787c5d9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -121,8 +121,7 @@ function ClientRequest(options, cb) { | |||
| 121 | 121 | if (self.socketPath) { | |
| 122 | 122 | self._last = true; | |
| 123 | 123 | self.shouldKeepAlive = false; | |
| 124 | - var conn = self.agent.createConnection({ path: self.socketPath }); | ||
| 125 | - self.onSocket(conn); | ||
| 124 | + self.onSocket(self.agent.createConnection({ path: self.socketPath })); | ||
| 126 | 125 | } else if (self.agent) { | |
| 127 | 126 | // If there is an agent we should default to Connection:keep-alive, | |
| 128 | 127 | // but only if the Agent will actually reuse the connection! | |
@@ -141,12 +140,11 @@ function ClientRequest(options, cb) { | |||
| 141 | 140 | self._last = true; | |
| 142 | 141 | self.shouldKeepAlive = false; | |
| 143 | 142 | if (options.createConnection) { | |
| 144 | - var conn = options.createConnection(options); | ||
| 143 | + self.onSocket(options.createConnection(options)); | ||
| 145 | 144 | } else { | |
| 146 | 145 | debug('CLIENT use net.createConnection', options); | |
| 147 | - var conn = net.createConnection(options); | ||
| 146 | + self.onSocket(net.createConnection(options)); | ||
| 148 | 147 | } | |
| 149 | - self.onSocket(conn); | ||
| 150 | 148 | } | |
| 151 | 149 | ||
| 152 | 150 | self._deferToConnect(null, null, function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments