proximax-storage / java-xpx-dfms-api-http

Official ProximaX Sirius Storage HTTP Java API
Apache License 2.0
2 stars 0 forks source link

connection leak in okhttp client #9

Open tonowie opened 3 years ago

tonowie commented 3 years ago

Following is logged by okhttp client, seems like there is connection leak.

Oct 19, 2020 12:43:43 AM okhttp3.internal.platform.Platform log
INFO: --> POST http://localhost:6401/api/v1/contract/accept?arg=z41z5fdpRCBkxKPmyaKQuHBDsr3XHS2hAX9kcAwtPvb2aRJC3FnsDqL (0-byte body)
Oct 19, 2020 12:43:43 AM okhttp3.internal.platform.Platform log
WARNING: A connection to http://localhost:6401/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);
Oct 19, 2020 12:43:52 AM okhttp3.internal.platform.Platform log
INFO: <-- 200 OK http://localhost:6401/api/v1/contract/accept?arg=z41z5fdpRCBkxKPmyaKQuHBDsr3XHS2hAX9kcAwtPvb2aRJC3FnsDqL (8985ms, unknown-length body)
tonowie commented 3 years ago

I have fixed issue with handling of Completable endpoints which includes potential fix for resource leak. Need to retest on master to see whether I can replicate this