| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7afcdd3 commit 661b255
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -115,8 +115,7 @@ function ClientRequest(options, cb) { | |||
| 115 | 115 | if (self.socketPath) { | |
| 116 | 116 | self._last = true; | |
| 117 | 117 | self.shouldKeepAlive = false; | |
| 118 | - var conn = self.agent.createConnection({ path: self.socketPath }); | ||
| 119 | - self.onSocket(conn); | ||
| 118 | + self.onSocket(self.agent.createConnection({ path: self.socketPath })); | ||
| 120 | 119 | } else if (self.agent) { | |
| 121 | 120 | // If there is an agent we should default to Connection:keep-alive, | |
| 122 | 121 | // but only if the Agent will actually reuse the connection! | |
@@ -135,12 +134,11 @@ function ClientRequest(options, cb) { | |||
| 135 | 134 | self._last = true; | |
| 136 | 135 | self.shouldKeepAlive = false; | |
| 137 | 136 | if (options.createConnection) { | |
| 138 | - var conn = options.createConnection(options); | ||
| 137 | + self.onSocket(options.createConnection(options)); | ||
| 139 | 138 | } else { | |
| 140 | 139 | debug('CLIENT use net.createConnection', options); | |
| 141 | - var conn = net.createConnection(options); | ||
| 140 | + self.onSocket(net.createConnection(options)); | ||
| 142 | 141 | } | |
| 143 | - self.onSocket(conn); | ||
| 144 | 142 | } | |
| 145 | 143 | ||
| 146 | 144 | self._deferToConnect(null, null, function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments