diff --git a/tools/goctl/rpc/gen/genmain.go b/tools/goctl/rpc/gen/genmain.go index 33c412ac..c9b6ccd5 100644 --- a/tools/goctl/rpc/gen/genmain.go +++ b/tools/goctl/rpc/gen/genmain.go @@ -39,6 +39,7 @@ func main() { {{.registers}} }) logx.Must(err) + defer s.Stop() fmt.Printf("Starting rpc server at %s...\n", c.ListenOn) s.Start()