From 5f9ed819170c4df20b26de991ac2c29ef11cd32c Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 10 Jul 2014 00:16:09 +1000 Subject: [PATCH] Add some extra char flags to connection status --- connection.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/connection.go b/connection.go index 91d5b327..10e84d02 100644 --- a/connection.go +++ b/connection.go @@ -66,11 +66,20 @@ func (cn *connection) WriteStatus(w io.Writer) { 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') } -- 2.50.0