mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-29 18:48:11 -07:00
(tested) change DataStorage interface to accept byte array as value
This commit is contained in:
@@ -60,6 +60,15 @@ func newStore(cfg r.Config) (*store, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if cfg.PeerLifetime <= 0 {
|
||||
logger.Warn().
|
||||
Str("name", "peerLifetime").
|
||||
Dur("provided", cfg.PeerLifetime).
|
||||
Dur("default", storage.DefaultPeerLifetime).
|
||||
Msg("falling back to default configuration")
|
||||
cfg.PeerLifetime = storage.DefaultPeerLifetime
|
||||
}
|
||||
|
||||
var rs r.Connection
|
||||
|
||||
if rs, err = cfg.Connect(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user