Comment and formatting
This commit is contained in:
parent
69ffb9bc8d
commit
ed0fa62340
|
@ -264,6 +264,7 @@ func NewClient(cfg *Config) (cl *Client, err error) {
|
||||||
cl.event.L = &cl.mu
|
cl.event.L = &cl.mu
|
||||||
storageImpl := cfg.DefaultStorage
|
storageImpl := cfg.DefaultStorage
|
||||||
if storageImpl == nil {
|
if storageImpl == nil {
|
||||||
|
// We'd use mmap but HFS+ doesn't support sparse files.
|
||||||
storageImpl = storage.NewFile(cfg.DataDir)
|
storageImpl = storage.NewFile(cfg.DataDir)
|
||||||
cl.onClose = append(cl.onClose, func() {
|
cl.onClose = append(cl.onClose, func() {
|
||||||
if err := storageImpl.Close(); err != nil {
|
if err := storageImpl.Close(); err != nil {
|
||||||
|
|
|
@ -150,9 +150,9 @@ func (t *Torrent) KnownSwarm() (ks []Peer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ks = append(ks, Peer{
|
ks = append(ks, Peer{
|
||||||
Id: conn.PeerID,
|
Id: conn.PeerID,
|
||||||
IP: ip,
|
IP: ip,
|
||||||
Port: port,
|
Port: port,
|
||||||
Source: conn.Discovery,
|
Source: conn.Discovery,
|
||||||
// > If the connection is encrypted, that's certainly enough to set SupportsEncryption.
|
// > 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
|
// > But if we're not connected to them with an encrypted connection, I couldn't say
|
||||||
|
|
Loading…
Reference in New Issue