mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 10:24:40 +01:00
Revert "move ConfigLoad and InitPluginsGlobals to appMain"
This reverts commit b67d19ffb3
.
This commit is contained in:
parent
393195066e
commit
828af28658
1 changed files with 9 additions and 7 deletions
|
@ -109,7 +109,15 @@ func main() {
|
|||
}
|
||||
|
||||
func (app *App) Start(service service.Service) error {
|
||||
go app.appMain()
|
||||
go func() {
|
||||
if err := ConfigLoad(app.proxy, app.flags); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
if err := app.proxy.InitPluginsGlobals(); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
app.appMain()
|
||||
}()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -123,12 +131,6 @@ func (app *App) Stop(service service.Service) error {
|
|||
}
|
||||
|
||||
func (app *App) appMain() {
|
||||
if err := ConfigLoad(app.proxy, app.flags); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
if err := app.proxy.InitPluginsGlobals(); err != nil {
|
||||
dlog.Fatal(err)
|
||||
}
|
||||
pidfile.Write()
|
||||
app.proxy.StartProxy()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue