Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Timeout type #528

Merged
merged 4 commits into from
Oct 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/http2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/
export interface SessionData {
session: http2.ClientHttp2Session;
timeoutHandle?: NodeJS.Timer;
timeoutHandle?: NodeJS.Timeout;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typically, this would be considered a breaking change, however the existing type in itself is a bug and must be fixed as it is blocking all PRs in this library.

}

/**
Expand Down Expand Up @@ -168,7 +168,7 @@
return;
});
} catch (e) {
closeSession(url);

Check warning on line 171 in src/http2.ts

View workflow job for this annotation

GitHub Actions / lint

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
reject(e);
}
res.request = req as {} as GaxiosXMLHttpRequest;
Expand All @@ -193,7 +193,7 @@
// choice. Keeping this channel open will hold a file descriptor
// which will prevent the process from exiting.
sessionData.timeoutHandle = setTimeout(() => {
closeSession(url);

Check warning on line 196 in src/http2.ts

View workflow job for this annotation

GitHub Actions / lint

Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator
}, 500);
});
}
Expand Down
Loading