2014-08-28 06:04:41 +08:00
|
|
|
package torrent
|
|
|
|
|
2016-07-05 22:42:16 +08:00
|
|
|
func worseConn(l, r *connection) bool {
|
|
|
|
if l.useful() != r.useful() {
|
|
|
|
return r.useful()
|
2015-06-29 22:45:26 +08:00
|
|
|
}
|
2016-07-05 22:42:16 +08:00
|
|
|
if !l.lastHelpful().Equal(r.lastHelpful()) {
|
|
|
|
return l.lastHelpful().Before(r.lastHelpful())
|
2014-09-14 01:40:35 +08:00
|
|
|
}
|
2016-07-05 22:42:16 +08:00
|
|
|
return l.completedHandshake.Before(r.completedHandshake)
|
2014-09-11 18:31:31 +08:00
|
|
|
}
|