Reverting moving LockOSThread to main module.

This commit is contained in:
2016-11-21 02:43:05 +05:00
parent 0392f510f5
commit 93d2bb7fc1
4 changed files with 17 additions and 1 deletions

View File

@@ -85,6 +85,7 @@ func (c *Cache) FlushServers(data map[string]string) {
}
}
Database.Unlock()
tx := Database.Db.MustBegin()
fmt.Println("Adding new servers...")
if len(new_servers) > 0 {
@@ -101,6 +102,7 @@ func (c *Cache) FlushServers(data map[string]string) {
}
tx.Commit()
Database.Lock()
fmt.Println("Done")
}