Fix #41
This commit is contained in:
parent
b13444f12e
commit
b86253c80d
1
TODO
1
TODO
|
@ -7,3 +7,4 @@
|
|||
* Handle Torrent being dropped before GotInfo.
|
||||
* Track connection chunk contributions to successful and failed piece hashes. Only drop the worst performer on a bad hash. Maybe block its IP.
|
||||
* Remove assumptions that the first piece requested will be the first that peers will send.
|
||||
* Clean-up DHT transaction code, it's just nasty.
|
||||
|
|
|
@ -36,7 +36,12 @@ func (t *Transaction) tryHandleResponse() {
|
|||
return
|
||||
}
|
||||
select {
|
||||
case r := <-t.response:
|
||||
case r, ok := <-t.response:
|
||||
if !ok {
|
||||
// TODO: I think some assumption is broken. This isn't supposed to
|
||||
// happen.
|
||||
break
|
||||
}
|
||||
t.userOnResponse(r)
|
||||
// Shouldn't be called more than once.
|
||||
t.userOnResponse = nil
|
||||
|
|
Loading…
Reference in New Issue