|
|
@@ -314,6 +314,7 @@ func recursiveUpdate(dst, src reflect.Value) error {
|
|
|
|
|
|
// return broadcast state
|
|
|
func GetState() structs.AuthBroadcast {
|
|
|
+ config.Logger.Info("Getting state")
|
|
|
mu.Lock()
|
|
|
defer mu.Unlock()
|
|
|
return broadcastState
|
|
|
@@ -322,6 +323,7 @@ func GetState() structs.AuthBroadcast {
|
|
|
// return json string of current broadcast state
|
|
|
func GetStateJson() ([]byte, error) {
|
|
|
bState := GetState()
|
|
|
+ config.Logger.Info("got state")
|
|
|
broadcastJson, err := json.Marshal(bState)
|
|
|
if err != nil {
|
|
|
errmsg := fmt.Sprintf("Error marshalling response: %v", err)
|
|
|
@@ -334,7 +336,7 @@ func GetStateJson() ([]byte, error) {
|
|
|
// broadcast the global state to auth'd clients
|
|
|
func BroadcastToClients() error {
|
|
|
authJson, err := GetStateJson()
|
|
|
- config.Logger.Info("Got state json")
|
|
|
+ config.Logger.Info("returned state json")
|
|
|
if err != nil {
|
|
|
errmsg := fmt.Errorf("Error marshalling auth broadcast:", err)
|
|
|
return errmsg
|