File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
webmagic-core/src/main/java/us/codecraft/webmagic Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -333,9 +333,10 @@ public void run() {
333333 }
334334 } else {
335335 // wait until new url added,
336- if (waitNewUrl ())
337- //if interrupted
336+ if (waitNewUrl ()) {
337+ //if interrupted
338338 break ;
339+ }
339340 continue ;
340341 }
341342 }
@@ -805,11 +806,13 @@ public Scheduler getScheduler() {
805806 * Set wait time when no url is polled.<br><br>
806807 *
807808 * @param emptySleepTime In MILLISECONDS.
809+ * @return this
808810 */
809- public void setEmptySleepTime (long emptySleepTime ) {
811+ public Spider setEmptySleepTime (long emptySleepTime ) {
810812 if (emptySleepTime <=0 ){
811813 throw new IllegalArgumentException ("emptySleepTime should be more than zero!" );
812814 }
813815 this .emptySleepTime = emptySleepTime ;
816+ return this ;
814817 }
815818}
You can’t perform that action at this time.
0 commit comments