mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-11-09 22:33:34 +00:00
defer at right place
This commit is contained in:
parent
0bc22154e5
commit
d4613f156b
@ -109,7 +109,6 @@ func main() {
|
|||||||
// Configuration error. Exit with a special value to prevent systemd from restarting.
|
// Configuration error. Exit with a special value to prevent systemd from restarting.
|
||||||
os.Exit(23)
|
os.Exit(23)
|
||||||
}
|
}
|
||||||
defer server.Close()
|
|
||||||
|
|
||||||
if *test {
|
if *test {
|
||||||
fmt.Println("Configuration OK.")
|
fmt.Println("Configuration OK.")
|
||||||
@ -120,6 +119,7 @@ func main() {
|
|||||||
fmt.Println("Failed to start", err)
|
fmt.Println("Failed to start", err)
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
|
defer server.Close()
|
||||||
|
|
||||||
// Explicitly triggering GC to remove garbage from config loading.
|
// Explicitly triggering GC to remove garbage from config loading.
|
||||||
runtime.GC()
|
runtime.GC()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user