Guard against pinging YP when offline. Closes #600
This commit is contained in:
parent
ec4b6fd4c4
commit
1509a65167
6
yp/yp.go
6
yp/yp.go
@ -64,6 +64,12 @@ func (yp *YP) ping() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hack: Don't allow ping'ing when offline.
|
||||||
|
// It shouldn't even be trying to, but on some instances the ping timer isn't stopping.
|
||||||
|
if !getStatus().Online {
|
||||||
|
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