quartz_torrent 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -0
- data/lib/quartz_torrent/peerclient.rb +6 -0
- metadata +4 -3
data/README.md
CHANGED
|
@@ -1027,6 +1027,12 @@ module QuartzTorrent
|
|
|
1027
1027
|
end
|
|
1028
1028
|
|
|
1029
1029
|
blockInfo = torrentData.blockState.createBlockinfoByPieceResponse(msg.pieceIndex, msg.blockOffset, msg.data.length)
|
|
1030
|
+
|
|
1031
|
+
if ! peer.requestedBlocks.has_key?(blockInfo.blockIndex)
|
|
1032
|
+
@logger.debug "Receive piece: we either didn't request this piece, or it was already received due to endgame strategy. Ignoring this message."
|
|
1033
|
+
return
|
|
1034
|
+
end
|
|
1035
|
+
|
|
1030
1036
|
if torrentData.blockState.blockCompleted?(blockInfo)
|
|
1031
1037
|
@logger.debug "Receive piece: we already have this block. Ignoring this message."
|
|
1032
1038
|
return
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: quartz_torrent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bencode
|
|
@@ -171,7 +171,8 @@ files:
|
|
|
171
171
|
- bin/quartztorrent_magnet_from_torrent
|
|
172
172
|
- bin/quartztorrent_show_info
|
|
173
173
|
homepage: https://github.com/jeffwilliams/quartz-torrent
|
|
174
|
-
licenses:
|
|
174
|
+
licenses:
|
|
175
|
+
- MIT
|
|
175
176
|
post_install_message:
|
|
176
177
|
rdoc_options: []
|
|
177
178
|
require_paths:
|