From c04894c4042d61f605a415999d974f6be0e6db8e Mon Sep 17 00:00:00 2001 From: boyce Date: Wed, 20 Mar 2019 16:51:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E5=A4=B1=E8=B4=A5=EF=BC=8C=E4=B8=8D=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/Module.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/Module.go b/service/Module.go index 10dd5b2..27fa990 100644 --- a/service/Module.go +++ b/service/Module.go @@ -1,6 +1,7 @@ package service import ( + "os" "sync/atomic" "sync" @@ -260,8 +261,8 @@ func (slf *BaseModule) RunModule(module IModule) { err := module.OnInit() if err != nil { GetLogger().Printf(LEVER_ERROR, "Start module %T id is %d is fail,reason:%v...", module, module.GetModuleId(), err) + os.Exit(-1) } else { - GetLogger().Printf(LEVER_INFO, "Start module %T ...", module) }