Taipei-Torrent icon indicating copy to clipboard operation
Taipei-Torrent copied to clipboard

fixing error in closing peer

Open liangmingyuanneo opened this issue 9 years ago • 1 comments

Taipei-Torrent should close peer when err != io.EOF, otherwise, as in the original codes, it will close peer when err ==io.EOF. But this will happen every time when it can not receive a piece by function "err = ts.RequestBlock2(p, k, false)". Because this function will return io.EOF when its peers do not have the pieces it needs. After closing, it can not download pieces from the peer because there is no connection between them anymore, even though the peer have the pieces it need again. I have tested this for one day to find the reasons that Taipei-Torrent can not receive pieces after it do not get piece one time and set to "UNINTERESTED" to the peer.

liangmingyuanneo avatar Jul 08 '16 11:07 liangmingyuanneo

won't this cause the connection to remain open when you hit the actual end of the file?

luisdavim avatar Feb 08 '19 09:02 luisdavim