Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Query - run is overwritten #114

Closed
kumavis opened this issue May 10, 2019 · 4 comments
Closed

Query - run is overwritten #114

kumavis opened this issue May 10, 2019 · 4 comments
Assignees

Comments

@kumavis
Copy link
Contributor

kumavis commented May 10, 2019

Query has a method called run. Query also assigns to this.run which would shadow the method. Is this a mistake or intentional? If its intentional its surprising and should be heavily commented.

run (peers, callback) {
if (!this.dht._queryManager.running) {
this._log.error('Attempt to run query after shutdown')
return callback(null, { finalSet: new Set(), paths: [] })
}
if (peers.length === 0) {
this._log.error('Running query with no peers')
return callback(null, { finalSet: new Set(), paths: [] })
}
this.run = new Run(this)

@kumavis
Copy link
Contributor Author

kumavis commented May 10, 2019

query.run is called at least here

@kumavis
Copy link
Contributor Author

kumavis commented May 10, 2019

cant wait for the Awesome Typescript Endeavour 😉

@kumavis
Copy link
Contributor Author

kumavis commented May 10, 2019

related #113

@vasco-santos
Copy link
Member

This should be fixed by #116

@ghost ghost removed the status/in-progress In progress label May 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants