]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Comment and formatting
authorMatt Joiner <anacrolix@gmail.com>
Sat, 16 Sep 2017 14:45:12 +0000 (00:45 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 16 Sep 2017 14:45:12 +0000 (00:45 +1000)
client.go
torrent.go

index 1fcc3c6e2ea3e88ea57020bfeaf20cb405d5a309..cca19e1efb8d00a52031e487affbbb33f8e898b4 100644 (file)
--- a/client.go
+++ b/client.go
@@ -264,6 +264,7 @@ func NewClient(cfg *Config) (cl *Client, err error) {
        cl.event.L = &cl.mu
        storageImpl := cfg.DefaultStorage
        if storageImpl == nil {
+               // We'd use mmap but HFS+ doesn't support sparse files.
                storageImpl = storage.NewFile(cfg.DataDir)
                cl.onClose = append(cl.onClose, func() {
                        if err := storageImpl.Close(); err != nil {
index f1ff59d0668e85ecf358457ea1c25baf910f18ef..1d34b62cee122ca2373fea0d19b8f00d1e280e11 100644 (file)
@@ -150,9 +150,9 @@ func (t *Torrent) KnownSwarm() (ks []Peer) {
                }
 
                ks = append(ks, Peer{
-                       Id: conn.PeerID,
-                       IP: ip,
-                       Port: port,
+                       Id:     conn.PeerID,
+                       IP:     ip,
+                       Port:   port,
                        Source: conn.Discovery,
                        // > If the connection is encrypted, that's certainly enough to set SupportsEncryption.
                        // > But if we're not connected to them with an encrypted connection, I couldn't say