]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Refine connection status flags
authorMatt Joiner <anacrolix@gmail.com>
Tue, 9 Dec 2014 06:26:06 +0000 (00:26 -0600)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 9 Dec 2014 06:26:06 +0000 (00:26 -0600)
connection.go

index 05b037ab0d634a3714c1ba7396d627f14ccfa75f..eaabaacaa66510a8dcb557a2e931749f8445b14c 100644 (file)
@@ -176,8 +176,11 @@ func (cn *connection) WriteStatus(w io.Writer) {
        if len(cn.Requests) != 0 {
                c('D')
        }
+       if !cn.Interested {
+               c('z')
+       }
        if cn.PeerChoked && cn.Interested {
-               c('d')
+               c('i')
        }
        if !cn.Choked {
                if cn.PeerInterested {