File tree 2 files changed +18
-2
lines changed 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,15 @@ func (g *Manager) start(ctx context.Context) {
118
118
defer close (startupDone )
119
119
// Wait till we're done getting all of the listeners and then close
120
120
// the unused ones
121
- g .createServerWaitGroup .Wait ()
121
+ func () {
122
+ // FIXME: there is a fundamental design problem of the "manager" and the "wait group".
123
+ // If nothing has started, the "Wait" just panics: sync: WaitGroup is reused before previous Wait has returned
124
+ // There is no clear solution besides a complete rewriting of the "manager"
125
+ defer func () {
126
+ _ = recover ()
127
+ }()
128
+ g .createServerWaitGroup .Wait ()
129
+ }()
122
130
// Ignore the error here there's not much we can do with it
123
131
// They're logged in the CloseProvidedListeners function
124
132
_ = CloseProvidedListeners ()
Original file line number Diff line number Diff line change @@ -227,7 +227,15 @@ func (g *Manager) awaitServer(limit time.Duration) bool {
227
227
c := make (chan struct {})
228
228
go func () {
229
229
defer close (c )
230
- g .createServerWaitGroup .Wait ()
230
+ func () {
231
+ // FIXME: there is a fundamental design problem of the "manager" and the "wait group".
232
+ // If nothing has started, the "Wait" just panics: sync: WaitGroup is reused before previous Wait has returned
233
+ // There is no clear solution besides a complete rewriting of the "manager"
234
+ defer func () {
235
+ _ = recover ()
236
+ }()
237
+ g .createServerWaitGroup .Wait ()
238
+ }()
231
239
}()
232
240
if limit > 0 {
233
241
select {
You can’t perform that action at this time.
0 commit comments