Skip to content
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

Make the client to support simultaneous requests #32

Open
v-ladynev opened this issue Jun 25, 2021 · 2 comments
Open

Make the client to support simultaneous requests #32

v-ladynev opened this issue Jun 25, 2021 · 2 comments

Comments

@v-ladynev
Copy link

There is an error, if client is used to perform two or more requests at the time. Better to use OkHttp library

Caused by: java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated.
Make sure to release the connection before allocating another one.
	at org.apache.http.util.Asserts.check(Asserts.java:34) ~[httpcore-4.4.12.jar:4.4.12]
	at org.apache.http.impl.conn.BasicClientConnectionManager.getConnection(BasicClientConnectionManager.java:163) ~[httpclient-4.5.10.jar:4.5.10]
	at org.apache.http.impl.conn.BasicClientConnectionManager$1.getConnection(BasicClientConnectionManager.java:145) ~[httpclient-4.5.10.jar:4.5.10]
	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:417) ~[httpclient-4.5.10.jar:4.5.10]
	at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) ~[httpclient-4.5.10.jar:4.5.10]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.10.jar:4.5.10]
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) ~[httpclient-4.5.10.jar:4.5.10]
	at com.bandwidth.iris.sdk.IrisClient.executeRequest(IrisClient.java:169) ~[bandwidth-java-iris-sdk-1.10.jar:1.10]
	at com.bandwidth.iris.sdk.IrisClient.get(IrisClient.java:87) ~[bandwidth-java-iris-sdk-1.10.jar:1.10]
	at com.bandwidth.iris.sdk.IrisClient.get(IrisClient.java:71) ~[bandwidth-java-iris-sdk-1.10.jar:1.10]
@v-ladynev
Copy link
Author

Guys, keep in mind your client is senseless for PROD without fixing this issue.

@ajrice6713
Copy link
Contributor

Hey @v-ladynev,

We are planning a major upgrade of this SDK (and all others) in Q2/Q3 of this year - the java-bandwidth-iris package will be deprecated and the numbers api functionality will be added to our java-sdk package, and it will utilize the okhttp-gson client which should resolve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants