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