mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 23:39:56 +01:00
fix(be): do not panic in boltdb connection
This commit is contained in:
parent
b5a99eba7f
commit
37e7c4aca1
@ -82,7 +82,8 @@ func (d *BoltDb) Connect(token string) {
|
||||
}
|
||||
|
||||
if _, exists := d.connections[token]; exists {
|
||||
panic(fmt.Errorf("Connection " + token + " already exists"))
|
||||
// Use for debugging
|
||||
//panic(fmt.Errorf("Connection " + token + " already exists"))
|
||||
}
|
||||
|
||||
if len(d.connections) > 0 {
|
||||
@ -120,7 +121,8 @@ func (d *BoltDb) Close(token string) {
|
||||
_, exists := d.connections[token]
|
||||
|
||||
if !exists {
|
||||
panic(fmt.Errorf("can not close closed connection " + token))
|
||||
// Use for debugging
|
||||
//panic(fmt.Errorf("can not close closed connection " + token))
|
||||
}
|
||||
|
||||
if len(d.connections) > 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user