简体   繁体   中英

How to prevent jsoup from retrying

How do I effectively prevent jsoup from retrying to make a connection when the first try failed - for whatever reasons?

Which value for the timeout is appropriate?

Jsoup wont retry to connect if the first attempt fails. It will throw a ConnectException instead. In general you can keep the default timeout value (3 seconds).

Btw. what method are you using? parse() or connect() ? 2nd one is the better choice here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM