Skip to content

[operator, monitor] Correctly close response when posting to the sessions' backend #430

@kittaakos

Description

@kittaakos

Describe the bug

The response is not closed after pinging the session:

Expected behavior

try (var response = client.newCall(request).execute()) {
    // Maybe handle !response.isSuccessful()?
} catch (IOException e) {
    LOGGER.info("[{}] Could not send message to extension: {}", session.getSpec().getName(), e);
}

Bonus, one OkHttpClient is created per app lifecycle, not one per request:


Maybe log the !response.isSuccessful() case?

Cluster provider

No response

Version

No response

Additional information

Update:
Same issue in

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions