fixed travis issues

This commit is contained in:
Fabian Vogelsteller 2015-07-02 20:04:27 +02:00
parent b44390e48c
commit 2034c5d836
1 changed files with 6 additions and 5 deletions

View File

@ -42,13 +42,14 @@ var IpcProvider = function (path, net) {
_this._timeout();
});
this.connection.on('end', function(e){
this.connection.on('end', function(){
_this._timeout();
});
// LISTEN FOR CONNECTION RESPONSES
this.connection.on('data', function(data) {
/*jshint maxcomplexity: 6 */
data = data.toString();
// DE-CHUNKER
@ -59,8 +60,8 @@ var IpcProvider = function (path, net) {
.replace(/\}\]\{/g,'}]|--|{') // }]{
.split('|--|');
for (var i = 0; i < dechunkedData.length; i++) {
data = dechunkedData[i];
dechunkedData.forEach(function(data){
// prepend the last chunk
if(_this.lastChunk)
@ -79,8 +80,8 @@ var IpcProvider = function (path, net) {
// start timeout to cancel all requests
clearTimeout(_this.lastChunkTimeout);
_this.lastChunkTimeout = setTimeout(function(){
throw errors.InvalidResponse(result);
_this.timeout();
throw errors.InvalidResponse(result);
}, 1000 * 15);
return;
@ -105,7 +106,7 @@ var IpcProvider = function (path, net) {
_this.responseCallbacks[id](null, result);
delete _this.responseCallbacks[id];
}
}
});
});
};