From 04de863299e72ca1aedca5da4620a3e8f20136c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=9E=E3=83=AA=E3=82=A6=E3=82=B9?= Date: Tue, 12 Jul 2022 11:36:12 -0500 Subject: [PATCH] Adjusted context, fixed #46, fixed #47 --- database/database.go | 4 +--- superhighway84.go | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/database/database.go b/database/database.go index f15f7cf..30a5ca3 100644 --- a/database/database.go +++ b/database/database.go @@ -44,9 +44,7 @@ type Database struct { func (db *Database) init() (error) { var err error - // ctx, cancel := context.WithCancel(context.Background()) - ctx, cancel := context.WithTimeout(context.Background(), 600 * time.Second) - defer cancel() + ctx := context.Background() db.Logger.Debug("initializing NewOrbitDB ...") db.OrbitDB, err = orbitdb.NewOrbitDB(ctx, db.IPFSCoreAPI, &orbitdb.NewOrbitDBOptions{ diff --git a/superhighway84.go b/superhighway84.go index 0ab40ca..706d9a7 100644 --- a/superhighway84.go +++ b/superhighway84.go @@ -43,6 +43,7 @@ func NewLogger(filename string) (*zap.Logger, error) { filename, } } + return cfg.Build() }