فهرست منبع

Add NoticeExiting to indicate when tunnel-core is exiting

Adam Pritchard 10 سال پیش
والد
کامیت
3322b36afb
2فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 2 0
      psiphon/controller.go
  2. 5 0
      psiphon/notice.go

+ 2 - 0
psiphon/controller.go

@@ -229,6 +229,8 @@ func (controller *Controller) Run(shutdownBroadcast <-chan struct{}) {
 	controller.splitTunnelClassifier.Shutdown()
 
 	NoticeInfo("exiting controller")
+
+	NoticeExiting()
 }
 
 // SignalComponentFailure notifies the controller that an associated component has failed.

+ 5 - 0
psiphon/notice.go

@@ -321,6 +321,11 @@ func NoticeBuildInfo(buildDate, buildRepo, buildRev, goVersion, gomobileVersion
 		"gomobileVersion", gomobileVersion)
 }
 
+// NoticeExiting indicates that tunnel-core is exiting imminently.
+func NoticeExiting() {
+	outputNotice("NoticeExiting", false, true)
+}
+
 type repetitiveNoticeState struct {
 	message string
 	repeats int