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 @@ -59,7 +59,15 @@ func (g *Manager) start() {
59
59
go func () {
60
60
defer close (startupDone )
61
61
// 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
+ }()
63
71
// Ignore the error here there's not much we can do with it, they're logged in the CloseProvidedListeners function
64
72
_ = CloseProvidedListeners ()
65
73
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 {
150
150
c := make (chan struct {})
151
151
go func () {
152
152
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
+ }()
154
162
}()
155
163
if limit > 0 {
156
164
select {
You can’t perform that action at this time.
0 commit comments