File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
sources/net.sf.j2s.ajax/ajaxcore/net/sf/j2s/ajax Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ private boolean checkAbort() {
400
400
private void request () {
401
401
try {
402
402
connection = (HttpURLConnection ) new URL (url ).openConnection ();
403
+ connection .setReadTimeout (30000 ); // 30 seconds
403
404
connection .setDoInput (true );
404
405
connection .setRequestMethod (method );
405
406
connection .setRequestProperty ("User-Agent" ,
@@ -437,7 +438,7 @@ private void request() {
437
438
is = connection .getInputStream ();
438
439
} catch (IOException e ) {
439
440
if (checkAbort ()) return ; // exception caused by abort action
440
- e .printStackTrace ();
441
+ // e.printStackTrace();
441
442
readyState = 4 ;
442
443
if (onreadystatechange != null ) {
443
444
onreadystatechange .onLoaded ();
@@ -545,7 +546,7 @@ private void request() {
545
546
*/
546
547
} catch (IOException e ) {
547
548
if (checkAbort ()) return ; // exception caused by abort action
548
- e .printStackTrace ();
549
+ // e.printStackTrace();
549
550
readyState = 4 ;
550
551
if (onreadystatechange != null ) {
551
552
onreadystatechange .onLoaded ();
You can’t perform that action at this time.
0 commit comments