aboutsummaryrefslogtreecommitdiff
path: root/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'config.go')
-rw-r--r--config.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config.go b/config.go
index 5098d2c..f8f575e 100644
--- a/config.go
+++ b/config.go
@@ -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