Adjusted context, fixed #46, fixed #47

pull/48/head v0.2.1
マリウス 2 years ago
parent 69064d9df2
commit 04de863299
No known key found for this signature in database

@ -44,9 +44,7 @@ type Database struct {
func (db *Database) init() (error) { func (db *Database) init() (error) {
var err error var err error
// ctx, cancel := context.WithCancel(context.Background()) ctx := context.Background()
ctx, cancel := context.WithTimeout(context.Background(), 600 * time.Second)
defer cancel()
db.Logger.Debug("initializing NewOrbitDB ...") db.Logger.Debug("initializing NewOrbitDB ...")
db.OrbitDB, err = orbitdb.NewOrbitDB(ctx, db.IPFSCoreAPI, &orbitdb.NewOrbitDBOptions{ db.OrbitDB, err = orbitdb.NewOrbitDB(ctx, db.IPFSCoreAPI, &orbitdb.NewOrbitDBOptions{

@ -43,6 +43,7 @@ func NewLogger(filename string) (*zap.Logger, error) {
filename, filename,
} }
} }
return cfg.Build() return cfg.Build()
} }

Loading…
Cancel
Save