mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Fix race condition
This commit is contained in:
parent
233decef22
commit
c99ea62987
1 changed files with 1 additions and 1 deletions
2
mysql.go
2
mysql.go
|
|
@ -35,7 +35,7 @@ type DBWrapper struct {
|
|||
}
|
||||
|
||||
func (dbw *DBWrapper) IsConnected() bool {
|
||||
return *dbw.ConnectedAtomic != 0
|
||||
return atomic.LoadUint32(dbw.ConnectedAtomic) != 0
|
||||
}
|
||||
|
||||
func (dbw *DBWrapper) CompareAndSetConnected(connected bool) (swapped bool) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue