Skip to content

Commit

Permalink
home: fix clients disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Apr 14, 2021
1 parent b3f6592 commit 800d67d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions internal/home/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ func (clients *clientsContainer) Init(
}

clients.dhcpServer = dhcpServer
if etcHosts != nil {
clients.etcHosts = etcHosts
}
clients.etcHosts = etcHosts
clients.addFromConfig(objects)

if !clients.testing {
Expand Down
2 changes: 1 addition & 1 deletion internal/home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ func setupConfig(args options) {
if !args.noEtcHosts {
Context.etcHosts = &aghnet.EtcHostsContainer{}
Context.etcHosts.Init("")
Context.clients.Init(config.Clients, Context.dhcpServer, Context.etcHosts)
}
Context.clients.Init(config.Clients, Context.dhcpServer, Context.etcHosts)
config.Clients = nil

if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") &&
Expand Down

0 comments on commit 800d67d

Please sign in to comment.