Fix race condition where initial offline video state was not written

This commit is contained in:
Gabe Kangas 2021-03-31 23:08:14 -07:00
parent 23ba9bb8be
commit 7556671afc

View file

@ -36,7 +36,7 @@ func (s *FileWriterReceiverService) SetupFileWriterReceiverService(callbacks Fil
localListenerAddress := "127.0.0.1:0"
go func() {
// go func() {
listener, err := net.Listen("tcp", localListenerAddress)
if err != nil {
log.Fatalln("Unable to start internal video writing service", err)
@ -45,7 +45,7 @@ func (s *FileWriterReceiverService) SetupFileWriterReceiverService(callbacks Fil
listenerPort := strings.Split(listener.Addr().String(), ":")[1]
config.InternalHLSListenerPort = listenerPort
log.Traceln("Transcoder response service listening on: " + listenerPort)
go func() {
if err := http.Serve(listener, httpServer); err != nil {
log.Fatalln("Unable to start internal video writing service", err)
}