When Authenticator.authenticate() throws an exception the StreamAllocator isn't released
See original GitHub issueFirst of all sorry for not providing a failing test here, but I struggled to do that for this case.
I was just implementing an Authenticator when I found that when Authenticator.authenticate()
throws an exception (it has a catched IOException
in its signature, so that seems to be an expected case) the RetryAndFollowUpInterceptor
will never release its StreamAllocation
- as opposed to when returning null
in authenticate()
.
Here are the according lines in the RetryAndFollowUpInterceptor
:
Request followUp = followUpRequest(response, streamAllocation.route());
if (followUp == null) {
if (!forWebSocket) {
streamAllocation.release();
}
return response;
}
Shouldn’t there be a try catch around the call to followUpRequest()
to handle that case and and then re-throw the exception?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Common Troubleshooting Methods
Below we will cover some of the most common troubleshooting methods and techniques you can try when something isn't working.
Read more >App - StreamLocator
Love this app for accessing different geo locations on Netflix and Prime. Its basic and simple to use and streaming is good. It...
Read more >How to watch Paramount+ outside the USA - StreamLocator
Paramount+ streaming theatre movies. Another big bonus is that Paramount Plus will be streaming many blockbuster movies shortly after their theatre release.
Read more >Streamlocator Knowledge Base
Common questions and support documentation about all things StreamLocator.
Read more >changelog-1.4 - Apache
Release Notes - Wicket - Version 1.4.18 ** Bug * WICKET-3023 - Ajax does not ... a warn or throw an exception when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://github.com/square/okhttp/pull/3885
changes commited and pull request created.
I am new to open source community. Can I work it ?