Created
April 25, 2015 12:38
-
-
Save mattcollier/9117c7e527508b844588 to your computer and use it in GitHub Desktop.
variablescope
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bootstrapProgress = 0; | |
controlClient.on('data', function(data){ | |
data = data.toString(); | |
if (torControlMessageHandler) torControlMessageHandler(data.toString()); | |
if (data.search(/250-status\/bootstrap-phase/) >= 0) { | |
var bootstrapPhase = extractBootstrap2(data); | |
if (bootstrapPhase.progress < 100) { | |
setTimeout(bsStatus, 250); | |
} | |
console.log('new:', bootstrapPhase.progress, 'old:', bootstrapProgress); | |
if(bootstrapPhase.progress > bootstrapProgress) { | |
self.emit('bootstrap', bootstrapPhase); | |
} | |
var bootstrapProgress = bootstrapPhase.progress; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment