Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain closed state and add isClosed property #21

Closed
gmaclennan opened this issue Nov 16, 2023 · 2 comments · Fixed by #42
Closed

Maintain closed state and add isClosed property #21

gmaclennan opened this issue Nov 16, 2023 · 2 comments · Fixed by #42

Comments

@gmaclennan
Copy link
Member

After the indexer is closed, it won't work any more. However currently behaviour is undefined because we don't keep a reference of the closed state. This is a non-urgent issue, because it's not causing any problems, this is just a question of completeness. Methods should throw an error once it is closed.

@gmaclennan
Copy link
Member Author

Revisiting this, since the unlink() method requires the indexer to be closed, we should properly track the closing and closed states, and throw for other methods where relevant if state === 'closing' || state === 'closed' and throw for unlink() if state !== 'closed'. @EvanHahn

@EvanHahn
Copy link
Contributor

EvanHahn commented Apr 5, 2024

Addressed in #42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants