mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 11:41:39 +00:00
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>
This commit is contained in:
parent
d819bb3bb0
commit
bbca2c78cb
@ -137,8 +137,9 @@ func (s *Server) start() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s.rootPath = s.Dir
|
s.rootPath = s.Dir
|
||||||
if s.Store != nil && !s.Ephemeral {
|
if s.Store != nil {
|
||||||
if _, ok := s.Store.(*mem.Store); !ok {
|
_, isMemStore := s.Store.(*mem.Store)
|
||||||
|
if isMemStore && !s.Ephemeral {
|
||||||
return fmt.Errorf("in-memory store is only supported for Ephemeral nodes")
|
return fmt.Errorf("in-memory store is only supported for Ephemeral nodes")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user