mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +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
|
||||
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…
x
Reference in New Issue
Block a user