connection.go | 11 ++++++++++- diff --git a/connection.go b/connection.go index 91d5b327451cd8938165bdb0e7633f0edb8e829b..10e84d0259d08fd283ac69161803182fa6deb24f 100644 --- a/connection.go +++ b/connection.go @@ -66,10 +66,19 @@ c := func(b byte) { fmt.Fprintf(w, "%c", b) } // https://trac.transmissionbt.com/wiki/PeerStatusText + if cn.PeerInterested && !cn.Choked { + c('O') + } if len(cn.Requests) != 0 { c('D') - } else if cn.Interested { + } + if cn.PeerChoked && cn.Interested { c('d') + } + if !cn.Choked && cn.PeerInterested { + c('U') + } else { + c('u') } if !cn.PeerChoked && !cn.Interested { c('K')