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 {
}
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