fix(worker): do not init cgroup if it's not enabled

This commit is contained in:
bigeagle 2016-05-19 11:42:22 +08:00
parent fa98e4f029
commit f6d53c16d6

View File

@ -53,7 +53,9 @@ func GetTUNASyncWorker(cfg *Config) *Worker {
w.httpClient = httpClient
}
initCgroup(cfg.Cgroup.BasePath)
if cfg.Cgroup.Enable {
initCgroup(cfg.Cgroup.BasePath)
}
w.initJobs()
w.makeHTTPServer()
tunasyncWorker = w