Permalink
Browse files

actually set calledBack

  • Loading branch information...
1 parent 92560aa commit 4c321e202b5a5c3d7d10e8a639f4d0bb5257244e @devdazed devdazed committed Feb 5, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/connection.js
View
@@ -112,7 +112,7 @@ function escapeCQL(val) {
throw errors.create(new Error('Invalid Date'));
}
// C* < 2.0.2 doesn't work with negative longs
- if(_val<0){
+ if(_val<0){
return "'" + val.getUTCFullYear()
+ '-' + zero_pad(val.getUTCMonth() + 1)
+ '-' + zero_pad(val.getUTCDate())
@@ -399,6 +399,7 @@ Connection.prototype.execute = function(){
timer = setTimeout(function(){
if(!calledBack){
+ calledBack = true;
callback(new Error('Read Timed Out'));
self._connection.connection.destroy();
}
@@ -414,6 +415,7 @@ Connection.prototype.execute = function(){
return;
}
+ calledBack = true;
if(err){
callback(errors.create(err));
} else {

0 comments on commit 4c321e2

Please sign in to comment.