Skip to content

Commit

Permalink
set a random keys path if one is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
idk committed Nov 16, 2019
1 parent c9d0d0e commit 901ed3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,8 @@ func NewGarlicTCPTransportFromOptions(opts ...func(*GarlicTCPTransport) error) (
return nil, err
}
}
if g.keysPath == "" {
g.keysPath = "dht-" + i2phelpers.RandTunName()
}
return &g, nil
}

0 comments on commit 901ed3a

Please sign in to comment.