File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,15 @@ func (g *Manager) start() {
5959 go func () {
6060 defer close (startupDone )
6161 // Wait till we're done getting all the listeners and then close the unused ones
62- g .createServerWaitGroup .Wait ()
62+ func () {
63+ // FIXME: there is an fundamental design problem of the "manager" and the "wait group".
64+ // If nothing has started, the "Wait" just panics: sync: WaitGroup is reused before previous Wait has returned
65+ // There is no clear solution besides a complete rewriting of the "manager"
66+ defer func () {
67+ recover ()
68+ }()
69+ g .createServerWaitGroup .Wait ()
70+ }()
6371 // Ignore the error here there's not much we can do with it, they're logged in the CloseProvidedListeners function
6472 _ = CloseProvidedListeners ()
6573 g .notify (readyMsg )
Original file line number Diff line number Diff line change @@ -150,7 +150,15 @@ func (g *Manager) awaitServer(limit time.Duration) bool {
150150 c := make (chan struct {})
151151 go func () {
152152 defer close (c )
153- g .createServerWaitGroup .Wait ()
153+ func () {
154+ // FIXME: there is an fundamental design problem of the "manager" and the "wait group".
155+ // If nothing has started, the "Wait" just panics: sync: WaitGroup is reused before previous Wait has returned
156+ // There is no clear solution besides a complete rewriting of the "manager"
157+ defer func () {
158+ recover ()
159+ }()
160+ g .createServerWaitGroup .Wait ()
161+ }()
154162 }()
155163 if limit > 0 {
156164 select {
You can’t perform that action at this time.
0 commit comments