Skip to content

OkHttp4 Support Broken Due to Idle Connection PR #1176

@Rostifar

Description

@Rostifar

Describe the bug

A recent PR was merged, which requires ConnectionListener support to function correctly.

ConnectionListener was introduced in OkHttp 5.x, so this change will break OkHttp 4.x support.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected behavior

Building an OkHttpEngine4 instance should not require any OkHttp 5.x concepts.

Current behavior

Instantiating OkHttpEngine4 will lead to a ClassNotFoundException exception for ConnectionListener when config.buildClient(...) is called.

Steps to Reproduce

Configure a OkHttp4Engine in accordance with these instructions:

import aws.smithy.kotlin.runtime.http.engine.okhttp4.OkHttp4Engine
val client = OkHttp4Engine()

Use http-client-engine-okhttp4 v1.3.20 to reproduce.

Possible Solution

No response

Context

No response

Smithy-Kotlin version

aws.smithy.kotlin:http-client-engine-okhttp4:1.3.20

Platform (JVM/JS/Native)

JVM

Operating system and version

Ubuntu 20.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.potential-regressionMarking this issue as a potential regression to be checked by team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions