remove one listener
This commit is contained in:
parent
e21822891d
commit
513b1c2ab3
|
|
@ -320,7 +320,6 @@ export abstract class APIRequestContext extends SdkObject {
|
||||||
|
|
||||||
const request = requestConstructor(url, requestOptions as any, async response => {
|
const request = requestConstructor(url, requestOptions as any, async response => {
|
||||||
response.once('readable', () => { firstByteAt = monotonicTime(); });
|
response.once('readable', () => { firstByteAt = monotonicTime(); });
|
||||||
response.once('end', () => { endAt = monotonicTime(); });
|
|
||||||
|
|
||||||
const notifyRequestFinished = (body?: Buffer) => {
|
const notifyRequestFinished = (body?: Buffer) => {
|
||||||
const timings: har.Timings = {
|
const timings: har.Timings = {
|
||||||
|
|
@ -437,6 +436,7 @@ export abstract class APIRequestContext extends SdkObject {
|
||||||
|
|
||||||
const chunks: Buffer[] = [];
|
const chunks: Buffer[] = [];
|
||||||
const notifyBodyFinished = () => {
|
const notifyBodyFinished = () => {
|
||||||
|
endAt = monotonicTime();
|
||||||
const body = Buffer.concat(chunks);
|
const body = Buffer.concat(chunks);
|
||||||
notifyRequestFinished(body);
|
notifyRequestFinished(body);
|
||||||
fulfill({
|
fulfill({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue