Skip to content

Commit

Permalink
Add missing await for tcpdump stop and move to stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Feb 8, 2024
1 parent e823851 commit 618f763
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/core/engine/command/measure.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,11 @@ export class Measure {
this.result[this.numberOfMeasuredPages],
res
);

if (this.options.tcpdump) {
await this.tcpDump.stop();
}

return this.collect(url);
}

Expand Down Expand Up @@ -486,9 +491,6 @@ export class Measure {
* @private
*/
async collect(url) {
if (this.options.tcpdump) {
await this.tcpDump.stop();
}
// This stops collecting trace logs in Chrome etc
// await this.engineDelegate.beforeCollect();

Expand Down Expand Up @@ -649,7 +651,7 @@ export class Measure {
}

if (this.options.tcpdump) {
this.tcpDump.mv(url, this.index);
await this.tcpDump.mv(url, this.index);
}

await this.engineDelegate.afterEachURL(
Expand Down

0 comments on commit 618f763

Please sign in to comment.