OpenWB: improve error handling
This commit is contained in:
parent
a84e93fc6a
commit
c165a0949e
1 changed files with 5 additions and 2 deletions
|
|
@ -173,9 +173,12 @@ func (m *OpenWB) Enable(enable bool) error {
|
|||
current = m.current
|
||||
}
|
||||
|
||||
m.enabled = current > 0
|
||||
err := m.currentS(current)
|
||||
if err == nil {
|
||||
m.enabled = enable
|
||||
}
|
||||
|
||||
return m.currentS(current)
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *OpenWB) Enabled() (bool, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue