Scarlet icon indicating copy to clipboard operation
Scarlet copied to clipboard

Should retry set to true by default

Open georgi-mirchev opened this issue 2 years ago • 0 comments

https://github.com/Tinder/Scarlet/blob/a4764208951b7d07a7e54137d6c07df64ba3d64d/scarlet-protocol-websocket-okhttp/src/main/java/com/tinder/scarlet/websocket/okhttp/OkHttpWebSocketChannel.kt#L110

What is this? This InnerWebSocketListener() is not injected but rather created in the OkHttpWebSocketChannel.open() function. This leads to the behavior where shouldRetry is always set to true but there are cases where this should be false. Like a 404 response for an example. Why do you need to retry when the URL cannot be found? This needs to be done in a configurable manner meaning InnerWebSocketListener() should be injected and not created inside the function.

georgi-mirchev avatar Mar 21 '23 16:03 georgi-mirchev