This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
Asyncio rewrite of magneticod #76
Merged
Merged
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
8da8d20
First crack at porting to asyncio.
richardkiss eb8a2c7
Fix conditional.
richardkiss 2f68ac3
Improve naming.
richardkiss 4aea5df
Reduce leakage in bittorrent.py.
richardkiss f3ae493
More clean-up in error cases.
richardkiss 635fbe8
More clean-up and simplification.
richardkiss 4515fa8
More cleanup. Only hit bootstrap if it seems necessary.
richardkiss d04634b
Improve dht shutdown. Notice writing pauses.
richardkiss 73d97d8
Better cancel all outstanding tasks.
richardkiss 4b4c312
SybilNode now support pause_writing.
richardkiss f38a796
Add connection_lost. Properly handle shutdown of watch_q.
richardkiss 71f55f0
Reduce noise.
richardkiss 35c6176
Move neighbour task work to tick task.
richardkiss e6098ff
Use uvloop if available.
richardkiss 3e4eba7
Do explicit look-up of bootstrap nodes, and query all responses.
richardkiss 29b99a3
ModuleNotFoundError (new in 3.6) => ImportError.
richardkiss 9b1bbfc
Properly clean up fetch_metadata tasks.
richardkiss 8df4015
Be a little smarter with task clean-up.
richardkiss 4dc11b0
Tidy up clean-up. Simplify fetch_metadata.
richardkiss 5d37737
Add some resource debug logging.
richardkiss d7ead95
Refactor create_tasks out of main.
richardkiss 0e389aa
Query DB when checking if an infohash is new or not.
richardkiss File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regardless, it suggests during installation in setup.py add a message about use / not uvloop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I tested this on python3.6. I will change ModuleNotFoundError to ImportError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.