java.lang.IllegalStateException: closed

rajeshgalla
I get this error sometimes(very rare though, but still happens couple of times a day, and this crashes my server). Like the trace shows, this happens when I'm trying to get historical data minute wise of some day
java.lang.IllegalStateException: closed
at okio.RealBufferedSource.rangeEquals(RealBufferedSource.java:407)
at okio.RealBufferedSource.rangeEquals(RealBufferedSource.java:401)
at okhttp3.internal.Util.bomAwareCharset(Util.java:471)
at okhttp3.ResponseBody.string(ResponseBody.java:175)
at com.zerodhatech.kiteconnect.kitehttp.KiteResponseHandler.handle(KiteResponseHandler.java:24)
at com.zerodhatech.kiteconnect.kitehttp.KiteRequestHandler.getRequest(KiteRequestHandler.java:69)
at com.zerodhatech.kiteconnect.KiteConnect.getHistoricalData(KiteConnect.java:733)
  • sujith
    This could be because of the non JSON response from the server like when cloudflare error is thrown.
    You can catch the exception and retry.
Sign In or Register to comment.