2012-06-05 141 views

回答

0

最後我發現,這裏的解決方案是設置了HTTPClient

的HttpParams httpParameters =新BasicHttpParams超時()的代碼;

int timeoutConnection = 30000; HttpConnectionParams.setConnectionTimeout(httpParameters,timeoutConnection);

int timeoutSocket = 30000;

HttpConnectionParams.setSoTimeout(httpParameters,timeoutSocket);

HttpClient httpClient = new DefaultHttpClient(httpParameters);

+0

如果您找到更好的解決方案,請給出建議。 – BalaMurugan