diff options
-rw-r--r-- | config.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,7 +26,7 @@ var config struct { } var ( config_mutex sync.RWMutex // covers things like the database too - db *pgxpool.Pool + global_db *pgxpool.Pool ) // load_config loads the configuration file and sets up global things according @@ -59,7 +59,7 @@ func load_config(path string) error { if config.DB.Type != "postgres" { return err_unsupported_database_type } - db, err = pgxpool.New(context.Background(), config.DB.Conn) + global_db, err = pgxpool.New(context.Background(), config.DB.Conn) // BUG: Context-related leak: cancel context when the config is invalidated if err != nil { return err |