Skip to content

Commit

Permalink
Style changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Feb 24, 2012
1 parent c6187dc commit 5ff4645
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ Request.prototype.init = function (options) {
}

self.clientErrorHandler = function (error) {
if (self._aborted) {
return
}
if (self._aborted) return

if (self.setHost) delete self.headers.host
if (self.req._reusedSocket && error.code === 'ECONNRESET') {
Expand Down Expand Up @@ -299,9 +297,7 @@ Request.prototype.init = function (options) {
})

process.nextTick(function () {
if (self._aborted) {
return;
}
if (self._aborted) return

if (self.body) {
if (Array.isArray(self.body)) {
Expand Down Expand Up @@ -331,18 +327,14 @@ Request.prototype.getAgent = function (host, port) {
Request.prototype.start = function () {
var self = this

if (self._aborted) {
return;
}
if (self._aborted) return

self._started = true
self.method = self.method || 'GET'
self.href = self.uri.href
if (log) log('%method %href', self)
self.req = self.httpModule.request(self, function (response) {
if (self._aborted) {
return
}
if (self._aborted) return

self.response = response
response.request = self
Expand Down Expand Up @@ -440,9 +432,7 @@ Request.prototype.start = function () {
bodyLen += chunk.length
})
self.on("end", function () {
if (self._aborted) {
return
}
if (self._aborted) return

if (buffer.length && Buffer.isBuffer(buffer[0])) {
var body = new Buffer(bodyLen)
Expand Down

0 comments on commit 5ff4645

Please sign in to comment.