Explorar o código

Fixed force shutdown not working when startup bug

Toby Chui %!s(int64=2) %!d(string=hai) anos
pai
achega
cf62cab843
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      main.go

+ 3 - 3
main.go

@@ -87,9 +87,6 @@ func main() {
 		allow_hardware_management = &enablehw
 	}
 
-	//Setup handler for Ctrl +C
-	SetupCloseHandler()
-
 	//Clean up previous tmp files
 	final_tmp_directory := filepath.Clean(*tmp_directory) + "/tmp/"
 	tmp_directory = &final_tmp_directory
@@ -130,6 +127,9 @@ func main() {
 		sysdb.UpdateReadWriteMode(true)
 	}
 
+	//Setup handler for Ctrl +C
+	SetupCloseHandler()
+
 	//Start http server
 	go func() {
 		if *use_tls {