-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest version doesn't connect to the server properly [4.1.0] #87
Comments
Hi @rubenquadros12 , thank you for reporting this issue. We have filed it internally as 205140. I'm not sure when one of our engineers will get a chance to investigate, but we'll update this issue when we do. Thank you. |
Hey @tanderson-ld, thanks for responding. We have identified what caused the issue. Actually it was related to one of the interceptors used by the Okhttp client inside our app. Very similar to this issue, we noticed that one of the interceptors added in the Okhttp client, uses Peeks up to byteCount bytes from the response body and returns them as a new response body. If fewer than byteCount bytes are in the response body, the full response body is returned. If more than byteCount bytes are in the response body, the returned value will be truncated to byteCount bytes. After removing this interceptor from the okhttp client, the connection is successful. Is this an intended behaviour of the library? |
We don't intend to behave a certain way based on externally added interceptors, but perhaps it was leading to modification of the data our code was receiving? I haven't had a change to dig in deeper yet on how peek could interfere. It doesn't seem like it should. |
@hiteshchopra11 Would be very appreciated if you would kindly guide me on how to remove okhttp client interceptor? |
Hi,
I'm using version 4.1.0 of the library.
I'm calling
eventsource.start()
method to connect to the server.I see that the library internally calls
call.execute()
This
call.execute()
doesn't return anything and no code after this line gets executed.I have debugged the code, there are no exceptions.
I'm making both init and connect call in a
IO Dispatcher.
The funny thing is if I attach
HttpLoggingInterceptor
I can see 200 for the api call.I have tried by calling
eventsource.readAnyEvent()
as well which internally connects to the server first and it's the same result.My code snippets:
This is init call:
Connect call:
Can you please let me know what can be the issue?
Edit: If I dont use custom http client it works
The text was updated successfully, but these errors were encountered: