Comments and trivial tweaks
This commit is contained in:
parent
ee985e51cb
commit
324cc7a281
|
@ -1472,6 +1472,8 @@ func (c *connection) deleteRequest(r request) bool {
|
|||
panic(n)
|
||||
}
|
||||
c.updateRequests()
|
||||
// TODO: Other connections that aren't interested, and can provide this
|
||||
// chunk might be wakeable?
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ func (d *Decoder) Decode(msg *Message) (err error) {
|
|||
return
|
||||
}
|
||||
msg.Keepalive = false
|
||||
r := &io.LimitedReader{R:d.R, N:int64(length)}
|
||||
r := &io.LimitedReader{R: d.R, N: int64(length)}
|
||||
// Check that all of r was utilized.
|
||||
defer func() {
|
||||
if err != nil {
|
||||
|
|
|
@ -25,7 +25,7 @@ const (
|
|||
Cancel MessageType = 8
|
||||
Port MessageType = 9
|
||||
|
||||
// BEP 6
|
||||
// BEP 6 - Fast extension
|
||||
Suggest MessageType = 0x0d // 13
|
||||
HaveAll MessageType = 0x0e // 14
|
||||
HaveNone MessageType = 0x0f // 15
|
||||
|
|
|
@ -189,7 +189,7 @@ func TestTorrentMetainfoIncompleteMetadata(t *testing.T) {
|
|||
assert.True(t, ok)
|
||||
assert.True(t, hr.PeerExtensionBits.GetBit(pp.ExtensionBitExtended))
|
||||
assert.EqualValues(t, cl.PeerID(), hr.PeerID)
|
||||
assert.Equal(t, ih, hr.Hash)
|
||||
assert.EqualValues(t, ih, hr.Hash)
|
||||
|
||||
assert.EqualValues(t, 0, tt.metadataSize())
|
||||
|
||||
|
|
Loading…
Reference in New Issue