From f79bf409d3253131ac94ac9d5968099a502c5842 Mon Sep 17 00:00:00 2001 From: lgh <913337456@qq.com> Date: Wed, 20 Oct 2021 01:07:19 +0800 Subject: [PATCH] add runtime.Gosched() to rpc_sever waiting goroutine --- cmd/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/main.go b/cmd/main.go index 4303648..2f1f023 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -159,6 +159,7 @@ func runServer(ctx *cli.Context) error { } } } + runtime.Gosched() time.Sleep(time.Second) } }()