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

chore(close-potential-network-leaks) #19

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

alexandreferris
Copy link
Contributor

Some functions were propitious to leak the network response object from not closing them properly.

Added missing response.close() to:

  • API.java
  • LoginClient.java

PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

Some API functions were throwing this exception on the logs:

ConnectionPoolTimeoutException: Timeout waiting for connection from pool

But unfortunately we don't have the stack trace anymore.

Causes (Optional)

We forgot to call response.close(); on some functions.

Note: We either call response.close(); or response.readEntity(Something.class); so the network is properly closed.

Solutions

Add response.close(); to functions missing it in API.java and LoginClient.java

Some functions were propitious to leak the network response object from not closing them properly.

Added missing response.close() to:
* API.java
* LoginClient.java
@alexandreferris alexandreferris requested a review from a team as a code owner November 26, 2024 15:48
@alexandreferris alexandreferris self-assigned this Nov 26, 2024
Copy link

sonarcloud bot commented Nov 26, 2024

@alexandreferris alexandreferris merged commit 410809e into master Nov 26, 2024
4 checks passed
@alexandreferris alexandreferris deleted the chore/close-potential-network-leaks branch November 26, 2024 16:08
@echoes-hq echoes-hq bot added the echoes: technical-roadmap/technical-debt More specific category, to highlight Technical Debt being tackled. label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: technical-roadmap/technical-debt More specific category, to highlight Technical Debt being tackled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants