panic on startup error

This commit is contained in:
kaedwen
2023-07-09 15:11:46 +02:00
parent 033ed05f34
commit 28ca6cc820
+4 -1
View File
@@ -28,7 +28,10 @@ func main() {
http := server.NewHttpServer(lg.With(zap.String("context", "server")), &cfg)
webrtc.NewWebrtcHandler(ctx, lg.With(zap.String("context", "webrtc")), cfg.Stream(), http.Hndl)
err = webrtc.NewWebrtcHandler(ctx, lg.With(zap.String("context", "webrtc")), cfg.Stream(), http.Hndl)
if err != nil {
panic(err)
}
http.ListenAndServe(ctx, cfg.Http.Address())