You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
They pile up until the interceptor chain eventually causes a stack overflow.
Also, different interceptors from different requests get mixed up, making new requests invoke callbacks on previous requests.
Also, this makes the generated class thread-unsafe.
Progress listeners get added whenever an API callback is given, so this doesn't just happen to (the presumably rare) users who implement progress bars.
Swagger-codegen version
The library I'm using was generated with 2.3.0-SNAPSHOT I believe.
The code is unchanged in master.
Steps to reproduce
Make lots of ...Async() calls with a non-null callback parameter on the same api object.
Suggest a fix/enhancement
I don't see a way to add interceptors to individual requests in okhttp, so I guess a single interceptor should be made to look up (using Request.tag perhaps) which callback it needs to call.
The text was updated successfully, but these errors were encountered:
Description
In
Java/libraries/okhttp-gson/api.mustache
, the following lines add interceptors that never get removed:They pile up until the interceptor chain eventually causes a stack overflow.
Also, different interceptors from different requests get mixed up, making new requests invoke callbacks on previous requests.
Also, this makes the generated class thread-unsafe.
Progress listeners get added whenever an API callback is given, so this doesn't just happen to (the presumably rare) users who implement progress bars.
Swagger-codegen version
The library I'm using was generated with 2.3.0-SNAPSHOT I believe.
The code is unchanged in master.
Steps to reproduce
Make lots of
...Async()
calls with a non-nullcallback
parameter on the same api object.Suggest a fix/enhancement
I don't see a way to add interceptors to individual requests in okhttp, so I guess a single interceptor should be made to look up (using
Request.tag
perhaps) which callback it needs to call.The text was updated successfully, but these errors were encountered: