tsnet: fix mem.Store check for normal nodes
There was a typo in the check it was doing `!ok` instead of `ok`, this
restructures it a bit to read better.
Fixes #4506
Signed-off-by: Maisem Ali <maisem@tailscale.com>
(cherry picked from commit bbca2c78cb
)
release-branch/1.24
parent
f0e71f4a20
commit
b16e27db9e
|
@ -137,8 +137,9 @@ func (s *Server) start() error {
|
|||
}
|
||||
|
||||
s.rootPath = s.Dir
|
||||
if s.Store != nil && !s.Ephemeral {
|
||||
if _, ok := s.Store.(*mem.Store); !ok {
|
||||
if s.Store != nil {
|
||||
_, isMemStore := s.Store.(*mem.Store)
|
||||
if isMemStore && !s.Ephemeral {
|
||||
return fmt.Errorf("in-memory store is only supported for Ephemeral nodes")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue