File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
basic-crawler/src/internals Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -775,6 +775,7 @@ export class BasicCrawler<Context extends CrawlingContext = BasicCrawlingContext
775775 this . running = true ;
776776 this . stats . reset ( ) ;
777777 await this . stats . resetStore ( ) ;
778+ await this . sessionPool ?. resetStore ( ) ;
778779
779780 await purgeDefaultStorages ( { onlyPurgeOnce : true } ) ;
780781
Original file line number Diff line number Diff line change @@ -290,6 +290,10 @@ export class SessionPool extends EventEmitter {
290290 return this . _createSession ( ) ;
291291 }
292292
293+ async resetStore ( ) {
294+ await this . keyValueStore ?. setValue ( this . persistStateKey , null ) ;
295+ }
296+
293297 /**
294298 * Returns an object representing the internal state of the `SessionPool` instance.
295299 * Note that the object's fields can change in future releases.
You can’t perform that action at this time.
0 commit comments