Skip to content

Commit 19eccb1

Browse files
committed
Add http timeout as well as socket timeout
1 parent c774527 commit 19eccb1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/com/loopj/android/http/AsyncHttpClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public AsyncHttpClient() {
117117
ConnManagerParams.setMaxTotalConnections(httpParams, DEFAULT_MAX_CONNECTIONS);
118118

119119
HttpConnectionParams.setSoTimeout(httpParams, socketTimeout);
120+
HttpConnectionParams.setConnectionTimeout(httpParams, socketTimout);
120121
HttpConnectionParams.setTcpNoDelay(httpParams, true);
121122
HttpConnectionParams.setSocketBufferSize(httpParams, DEFAULT_SOCKET_BUFFER_SIZE);
122123

0 commit comments

Comments
 (0)