Skip to content
Snippets Groups Projects
Commit 7ecd4775 authored by ale's avatar ale
Browse files

Prevent initialization deadlock bug

If the server was signaled to shutdown when the Node was still waiting
to read its configuration, the configReady channel would never fire,
causing a lockup in NewNode().
parent bfdb77a2
No related branches found
Tags
1 merge request!2Add SSL functionality
Pipeline #6668 failed
......@@ -96,7 +96,11 @@ func New(parentCtx context.Context, session *concurrency.Session, ice Icecast, n
n.updateIcecast()
}
}()
<-configReady
select {
case <-ctx.Done():
return nil, ctx.Err()
case <-configReady:
}
// Register the Icecast endpoints. First the gossip service, below
// StatusEndpointPrefix with gossipPort, then the public Icecast
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment