Skip to content

Commit

Permalink
chore: final code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtPooki committed May 20, 2024
1 parent 023d034 commit 86e6f11
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/utils/src/abstract-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export abstract class AbstractSession<Provider, RetrieveBlockProgressEvents exte
try {
return await deferred.promise
} finally {
this.log('finally block, cleaning up session')
this.log.trace('retrieve finished, cleaning up session')
this.removeEventListener('provider', peerAddedToSessionListener)
this.findProviderQueue.clear()
this.queryProviderQueue.clear()
Expand Down Expand Up @@ -249,7 +249,6 @@ export abstract class AbstractSession<Provider, RetrieveBlockProgressEvents exte
* @param options - AbortOptions
*/
private async findProviders (cid: CID, count: number, options: AbortOptions): Promise<void> {
this.log('findProviders called')
const deferred: DeferredPromise<void> = pDefer()
let found = 0

Expand All @@ -266,10 +265,8 @@ export abstract class AbstractSession<Provider, RetrieveBlockProgressEvents exte
}

if (this.hasProvider(provider)) {
this.log('ignoring duplicate provider')
this.log.trace('ignoring duplicate provider')
continue
} else {
this.log('provider is not a duplicate')
}

found++
Expand Down

0 comments on commit 86e6f11

Please sign in to comment.