Skip to content

Upgrade to latest OkHttp 4.x release #1118

Closed
@rjrudin

Description

@rjrudin

While loading modules into a DHS instance using DHF 4.3.1 (which depends on java-client 4.1.2), the following message was logged by OkHttp, though the modules were still loaded correctly:

A connection to https://(host redacted):8013/ was leaked. Did you forget to close a response body?
java.lang.Throwable: response.body().close()
       at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:148)
       at okhttp3.RealCall.captureCallStackTrace(RealCall.java:89)
       at okhttp3.RealCall.execute(RealCall.java:73)
       at com.marklogic.client.impl.OkHttpServices.sendRequestOnce(OkHttpServices.java:651)
       at com.marklogic.client.impl.OkHttpServices.putPostValueImpl(OkHttpServices.java:2784)

I did some googling on this message and found square/okhttp#4399 , which seems related, as it involves the same bit of code as OkHttpServices line 651 - client.newCall(request).execute() . The fix for that OkHttp issue is in 3.12.

I can't verify that OkHttp 3.12 will prevent the above warning from showing up, but it seems like a good reason to get the java-client onto the latest 3.x release - it's currently on 3.10, and 3.14.2 is available.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions