Library was working fine, A few days ago i came across this issue, i tried setHeader("Connection", "close") but no luck :(
This issue is also linked to #912
2020-01-24 10:52:20.337 21230-21230/com.coomotravel.app D/WebServicesIonTask: (0 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: preparing request
2020-01-24 10:52:20.338 21230-21230/com.coomotravel.app D/WebServicesIonTask: (0 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: preparing request
2020-01-24 10:52:20.338 21230-21230/com.coomotravel.app I/WebServicesIonTask: (0 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: Using loader: com.koushikdutta.ion.loader.HttpLoader@b06fdf1
2020-01-24 10:52:20.339 21230-25949/com.coomotravel.app D/WebServicesIonTask: (0 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: Executing request.
2020-01-24 10:52:20.343 21230-25949/com.coomotravel.app D/WebServicesIonTask: (3 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: Reusing keep-alive socket
2020-01-24 10:52:20.343 21230-25949/com.coomotravel.app V/WebServicesIonTask: (4 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: socket connected
2020-01-24 10:52:20.345 21230-25949/com.coomotravel.app V/WebServicesIonTask: (5 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1:
GET /api/v2/user/activities/7?items=10&page=1 HTTP/1.1
Host: api.dev.coomotravel.com
User-Agent: Dalvik/2.1.0 (Linux; U; Android 7.0; SM-G920F Build/NRD90M)
Accept-Encoding: gzip, deflate
Connection: keep-alive
Accept: application/json
AUTHORIZATION: Bearer token
Cookie: laravel_session=eyJpdiI6Im5hXC9USTMxR2N0b1
2020-01-24 10:52:20.351 21230-25949/com.coomotravel.app V/WebServicesIonTask: (12 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: request completed
2020-01-24 10:52:20.813 21230-25949/com.coomotravel.app E/WebServicesIonTask: (473 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: exception during response
2020-01-24 10:52:20.831 21230-25949/com.coomotravel.app E/WebServicesIonTask: connection closed before headers received.
com.koushikdutta.async.http.ConnectionClosedException: connection closed before headers received.
at com.koushikdutta.async.http.AsyncHttpResponseImpl$2.onCompleted(AsyncHttpResponseImpl.java:54)
at com.koushikdutta.async.AsyncSSLSocketWrapper$5.onCompleted(AsyncSSLSocketWrapper.java:259)
at com.koushikdutta.async.AsyncNetworkSocket.reportEnd(AsyncNetworkSocket.java:241)
at com.koushikdutta.async.AsyncNetworkSocket.reportEndPending(AsyncNetworkSocket.java:253)
at com.koushikdutta.async.AsyncNetworkSocket.onReadable(AsyncNetworkSocket.java:170)
at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:869)
at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:717)
at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:46)
at com.koushikdutta.async.AsyncServer$11.run(AsyncServer.java:671)
2020-01-24 10:52:20.832 21230-25949/com.coomotravel.app E/WebServicesIonTask: (493 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: Connection error
2020-01-24 10:52:20.833 21230-25949/com.coomotravel.app E/WebServicesIonTask: connection closed before headers received.
com.koushikdutta.async.http.ConnectionClosedException: connection closed before headers received.
at com.koushikdutta.async.http.AsyncHttpResponseImpl$2.onCompleted(AsyncHttpResponseImpl.java:54)
at com.koushikdutta.async.AsyncSSLSocketWrapper$5.onCompleted(AsyncSSLSocketWrapper.java:259)
at com.koushikdutta.async.AsyncNetworkSocket.reportEnd(AsyncNetworkSocket.java:241)
at com.koushikdutta.async.AsyncNetworkSocket.reportEndPending(AsyncNetworkSocket.java:253)
at com.koushikdutta.async.AsyncNetworkSocket.onReadable(AsyncNetworkSocket.java:170)
at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:869)
at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:717)
at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:46)
at com.koushikdutta.async.AsyncServer$11.run(AsyncServer.java:671)
2020-01-24 10:52:20.836 21230-25949/com.coomotravel.app V/WebServicesIonTask: (495 ms) https://api.dev.coomotravel.com/api/v2/user/activities/7?items=10&page=1: closing out socket (exception)
Library was working fine, A few days ago i came across this issue, i tried
setHeader("Connection", "close")
but no luck :( This issue is also linked to #912