Skip to content

Commit

Permalink
Merge pull request hapijs#433 from wpreul/feature/servertimeout
Browse files Browse the repository at this point in the history
Refactoring request execute
  • Loading branch information
Eran Hammer committed Jan 31, 2013
2 parents 6f1d8c3 + 004d4d5 commit 09c0216
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ internals.Request.prototype._execute = function (route) {
var self = this;

this._route = route;
var isReplied = false;

var execute = function () {

Expand Down Expand Up @@ -279,11 +280,11 @@ internals.Request.prototype._execute = function (route) {

var reply = function (err) {

if (self._isReplied === true) { // Prevent any future responses to this request
if (isReplied === true) { // Prevent any future responses to this request
return;
}

self._isReplied = true;
isReplied = true;
clearTimeout(self._serverTimeoutId);

// Error exit
Expand Down

0 comments on commit 09c0216

Please sign in to comment.