You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/07/27 05:12:19 UTC

[GitHub] [dubbo] f2993942f commented on issue #2219: Dubbo Server 老是会调用DubboShutdownHook 自动关闭

f2993942f commented on issue #2219:
URL: https://github.com/apache/dubbo/issues/2219#issuecomment-887214658


   是这样的。
   如果你服务都注册启动成功,成功之后,然后自动又调用DubboShutdownHook 注销所有服务。
   检查一下你的Main方法。启动类里如果没有一种阻塞或者等待的操作,那基本启动完就会关闭。
   while(true){
      
   }
   或者
   try{
     system.in.read();
   }
   把主线程堵住不要让他结束,这样应该就不会主动注销了。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org