fix: memory and semaphore leaks#591
Draft
thismanyboyfriends2 wants to merge 5 commits intodatawhores:mainfrom
Draft
fix: memory and semaphore leaks#591thismanyboyfriends2 wants to merge 5 commits intodatawhores:mainfrom
thismanyboyfriends2 wants to merge 5 commits intodatawhores:mainfrom
Conversation
Author
|
Okay I've realised this issue is a little trickier than I first realised, after testing it seems to have introduced some other issues. Let me look into it and fix it... |
eeafe30 to
133ba17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've noticed from using OFscraper a fair bit that it doesn't seem to handle force closes or ctrl-c particularly well, especially on retries. Sometimes when running ofscraper a few times concurrently it seems to totally freeze up, even struggling to return the
--helpdialog. I've often had to resort to restarting the OS in order to free up resources.This PR is an attempt to clear up some of those issues:
manager is Nonewas comparison, not assignment; fixed tomanager = Nonedaemon=Truetodaemon=False, addedjoin(timeout=5)in exception handlersRuntimeErrorcatch for already-closed loopsshutdown(wait=True)on all pathsreturn_exceptions=Trueto gather callsI've been running it against a few profiles locally and this appears to work much better now, but I'm aware its a lot of changes - and there aren't many tests I can verify these fixes with. Any feedback is welcome.
Thanks!