mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-24 08:47:47 +00:00
Merge pull request #427 from neilalexander/ckrenabled
Fix panic when determining if CKR is enabled
This commit is contained in:
commit
7e837e97e9
@ -115,12 +115,13 @@ func (c *cryptokey) configure() error {
|
||||
|
||||
// Enable or disable crypto-key routing.
|
||||
func (c *cryptokey) setEnabled(enabled bool) {
|
||||
c.enabled.Store(true)
|
||||
c.enabled.Store(enabled)
|
||||
}
|
||||
|
||||
// Check if crypto-key routing is enabled.
|
||||
func (c *cryptokey) isEnabled() bool {
|
||||
return c.enabled.Load().(bool)
|
||||
enabled, ok := c.enabled.Load().(bool)
|
||||
return ok && enabled
|
||||
}
|
||||
|
||||
// Check whether the given address (with the address length specified in bytes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user