Skip to content

Commit

Permalink
Solves issue with SendWorker failing because it cannot start a Thread…
Browse files Browse the repository at this point in the history
… when constructing a connection pool. This solution is to do away with the connection pool. Since we are only ever using the ConnectionManager with a single thread (which is then discarded) there is no problem with multi threaded interference.
  • Loading branch information
william-ferguson-au committed Aug 1, 2014
1 parent 8fa8185 commit b5168e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/acra/util/HttpRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.auth.BasicScheme;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.impl.conn.SingleClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
Expand Down Expand Up @@ -211,7 +211,7 @@ private HttpClient getHttpClient() {
registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
}

final ClientConnectionManager clientConnectionManager = new ThreadSafeClientConnManager(httpParams, registry);
final ClientConnectionManager clientConnectionManager = new SingleClientConnManager(httpParams, registry);
final DefaultHttpClient httpClient = new DefaultHttpClient(clientConnectionManager, httpParams);

final HttpRequestRetryHandler retryHandler = new SocketTimeOutRetryHandler(httpParams, maxNrRetries);
Expand Down

0 comments on commit b5168e8

Please sign in to comment.