mikehardy / google-analytics-java

Open Source license compatible Java API for Google Analytics
9 stars 3 forks source link

OkHttp response not closed correctly in batch mode #16

Closed mikehardy closed 5 years ago

mikehardy commented 5 years ago

Seen in a log file


2018-10-09 07:00:50.878 4965-5182/com.ichi2.anki D/OkHttpClientImpl: post() response code/success: 200 / true
2018-10-09 07:03:07.617 4965-5191/com.ichi2.anki W/System: A resource failed to call response.body().close(). 
2018-10-09 07:03:07.618 4965-5191/com.ichi2.anki I/chatty: uid=10096(com.ichi2.anki) OkHttp Connecti identical 13 lines
2018-10-09 07:03:07.618 4965-5191/com.ichi2.anki W/System: A resource failed to call response.body().close(). 

Also it should be postBatch() in the output message

mikehardy commented 5 years ago

Can't re-use the connection if close isn't called so this affects performance pretty seriously