allocate yp at launch to allow for enabling it later
This commit is contained in:
parent
49bb899d51
commit
a67e938875
@ -63,9 +63,7 @@ func Start() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if data.GetDirectoryEnabled() {
|
_yp = yp.NewYP(GetStatus)
|
||||||
_yp = yp.NewYP(GetStatus)
|
|
||||||
}
|
|
||||||
|
|
||||||
chat.Setup(ChatListenerImpl{})
|
chat.Setup(ChatListenerImpl{})
|
||||||
|
|
||||||
|
4
yp/yp.go
4
yp/yp.go
@ -60,6 +60,10 @@ func (yp *YP) Stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (yp *YP) ping() {
|
func (yp *YP) ping() {
|
||||||
|
if !data.GetDirectoryEnabled() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
myInstanceURL := data.GetServerURL()
|
myInstanceURL := data.GetServerURL()
|
||||||
if myInstanceURL == "" {
|
if myInstanceURL == "" {
|
||||||
log.Warnln("Server URL not set in the configuration. Directory access is disabled until this is set.")
|
log.Warnln("Server URL not set in the configuration. Directory access is disabled until this is set.")
|
||||||
|
Loading…
Reference in New Issue
Block a user