Эх сурвалжийг харах

Fixed force shutdown not working when startup bug

Toby Chui 2 жил өмнө
parent
commit
cf62cab843
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  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 {