diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-21 16:05:37 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-21 16:05:37 -0400 |
commit | ece8a01fb1ec9417c1fc433a665024cc52dbf183 (patch) | |
tree | 8cf1eefba62a187c8cdeab5d04908278a6a1e3a9 | |
parent | b29e1c163f3cc88037f301c1cc1d71c7707ee64f (diff) | |
download | getwtxt-ece8a01fb1ec9417c1fc433a665024cc52dbf183.tar.gz |
missing mutex rlock for confobj
-rw-r--r-- | init.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/init.go b/init.go index 639a78b..97a998c 100644 --- a/init.go +++ b/init.go @@ -214,7 +214,9 @@ func initTemplates() *template.Template { // Pull DB data into cache, if available. func initDatabase() { + confObj.mu.RLock() db, err := leveldb.OpenFile(confObj.dbPath, nil) + confObj.mu.RUnlock() if err != nil { log.Fatalf("%v\n", err) } |