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

[BUG] Kotlin ApiClient leaks okhttp3.Response. #18996

Closed
1 of 6 tasks
gosusnp opened this issue Jun 21, 2024 · 0 comments
Closed
1 of 6 tasks

[BUG] Kotlin ApiClient leaks okhttp3.Response. #18996

gosusnp opened this issue Jun 21, 2024 · 0 comments

Comments

@gosusnp
Copy link
Contributor

gosusnp commented Jun 21, 2024

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

We tracked down a memory leak from the generated api client in kotlin.
The okhttp3.Response is closeable and isn't closed. This commit shows the fix we did on our end that addressed the leak.

openapi-generator version

We were using 0.6.2, we migrated to 7.6.0however, looking at the generated code, I believe the issue remains.

OpenAPI declaration file content or url
Generation Details
Steps to reproduce

Generate a kotlin client, keep on calling any requests, see memory usage keeps going up.

Related issues/PRs
Suggest a fix

Suggested fix: #18997

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants