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(stream): ensure .Close() doesn't panic #194

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

xx1906
Copy link
Contributor

@xx1906 xx1906 commented Jan 31, 2025

If a network anomaly occurs,directly calling the Close method will panic. Therefore,it is necessary to add a check in the Close method to determine whether the decoder is nil.

@xx1906 xx1906 requested a review from a team as a code owner January 31, 2025 15:43
@RobertCraigie RobertCraigie changed the title fix: properly handle Stream's Close function. fix(stream): ensure .Close() doesn't panic Feb 3, 2025
@RobertCraigie RobertCraigie changed the base branch from main to next February 3, 2025 15:19
Copy link
Collaborator

@RobertCraigie RobertCraigie left a comment

Choose a reason for hiding this comment

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

Thanks!

@RobertCraigie RobertCraigie merged commit 02983a3 into openai:next Feb 3, 2025
2 checks passed
@stainless-app stainless-app bot mentioned this pull request Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants