using volley with okhttp
I was using volley with okhttp. However, I was getting this warning: W/SingleClientConnManager﹕ Invalid use of SingleClientConnManager: connection still allocated. Make sure to release the connection before allocating another one
and this error : NetworkDispatcher.run: Unhandled exception java.lang.IllegalStateException java.lang.IllegalStateException at com.squareup.okhttp.internal.http.HttpEngine.getResponse(HttpEngine.java:416) at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:386) at com.squareup.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:495) at com.xxx.http.headresponse.MultiHeaderResponseHurlStack.performRequest(MultiHeaderResponseHurlStack.java:94) at com.xxx.http.multipart.MultiPartStack.performRequest(MultiPartStack.java:48) at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:96) at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)
Sorry,it's my own fault. I caught the exception in HttpEngine.readResponse() but didn't throw it out, then HttpURLConnectionImpl.execute() returned true which was not correct.