From 0f77500917e619b0c52880e59487f1e2eef005ab Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Fri, 27 Nov 2020 17:04:56 +0800 Subject: [PATCH] Waiting for schema to be initialized, close #3790 --- schema/schema.go | 1 + 1 file changed, 1 insertion(+) diff --git a/schema/schema.go b/schema/schema.go index 89392643..da4be305 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -252,6 +252,7 @@ func Parse(dest interface{}, cacheStore *sync.Map, namer Namer) (*Schema, error) close(schema.initialized) } } else { + <-s.(*Schema).initialized return s.(*Schema), nil }