From fe634e7c1216729ee2a09299bc465a800301d508 Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Fri, 29 Jul 2016 16:57:42 -0400 Subject: [PATCH] trace reading: only bind to the first tracingComplete event. --- lighthouse-core/gather/drivers/driver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lighthouse-core/gather/drivers/driver.js b/lighthouse-core/gather/drivers/driver.js index 1ef21d7fd3c8..8505081f28c1 100644 --- a/lighthouse-core/gather/drivers/driver.js +++ b/lighthouse-core/gather/drivers/driver.js @@ -255,7 +255,7 @@ class Driver { endTrace() { return new Promise((resolve, reject) => { // When the tracing has ended this will fire with a stream handle. - this.on('Tracing.tracingComplete', streamHandle => { + this.once('Tracing.tracingComplete', streamHandle => { this._readTraceFromStream(streamHandle) .then(traceContents => resolve(traceContents)); });