Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

allocate yp at launch to allow for enabling it later

Gabe Kangas04bd6c54dd5e
diff --git a/core/core.go b/core/core.go
index 938b83cbaa..3d3010b9c1 100644
--- a/core/core.go
+++ b/core/core.go
@@ -63,9 +63,7 @@ func Start() error {
return err
}
- if data.GetDirectoryEnabled() {
- _yp = yp.NewYP(GetStatus)
- }
+ _yp = yp.NewYP(GetStatus)
chat.Setup(ChatListenerImpl{})
diff --git a/yp/yp.go b/yp/yp.go
index 2fd8955b22..7f7102fd52 100644
--- a/yp/yp.go
+++ b/yp/yp.go
@@ -60,6 +60,10 @@ func (yp *YP) Stop() {
}
func (yp *YP) ping() {
+ if !data.GetDirectoryEnabled() {
+ return
+ }
+
myInstanceURL := data.GetServerURL()
if myInstanceURL == "" {
log.Warnln("Server URL not set in the configuration. Directory access is disabled until this is set.")