Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make code adhere to io.js style
  • Loading branch information
Nils Kuhnhenn committed Mar 14, 2015
commit d7331960c56c9e2e0e2ed461ae6069bda585acfc
14 changes: 7 additions & 7 deletions lib/_http_outgoing.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ function OutgoingMessage() {
this._headers = null;
this._headerNames = {};

var that = this;
var self = this;

// Call remaining callbacks if stream closes prematurely
this.once('close', function(){
if(that.output.length === 0) return;
this.once('close', function() {
if(self.output.length === 0) return;

var err = new Error('stream closed prematurely');

var outputCallbacks = that.outputCallbacks;
var outputCallbacks = self.outputCallbacks;

that.output = [];
that.outputEncodings = [];
that.outputCallbacks = [];
self.output = [];
self.outputEncodings = [];
self.outputCallbacks = [];

for(var i=0; i<outputCallbacks.length; i++){
var callback = outputCallbacks[i];
Expand Down