Skip to content

Commit dfa2c22

Browse files
committed
Merge pull request #566 from geoand/Apache_HttpClient_Connection_Manager
Switched SingleClientConnManager with ThreadSafeClientConnManager.
2 parents a57588c + 7eba867 commit dfa2c22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/swagger-codegen/src/main/resources/android-java/apiInvoker.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import org.apache.http.entity.ContentType;
1616
import org.apache.http.entity.StringEntity;
1717
import org.apache.http.impl.client.*;
1818
import org.apache.http.impl.conn.*;
19+
import org.apache.http.impl.conn.tsccm.*;
1920
import org.apache.http.params.*;
2021
import org.apache.http.util.EntityUtils;
2122

@@ -381,7 +382,7 @@ public class ApiInvoker {
381382
schemeRegistry.register(httpsScheme);
382383
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
383384

384-
ignoreSSLConnectionManager = new SingleClientConnManager(new BasicHttpParams(), schemeRegistry);
385+
ignoreSSLConnectionManager = new ThreadSafeClientConnManager(new BasicHttpParams(), schemeRegistry);
385386
} catch (NoSuchAlgorithmException e) {
386387
// This will only be thrown if SSL isn't available for some reason.
387388
} catch (KeyManagementException e) {

0 commit comments

Comments
 (0)