diff --git a/app/app.go b/app/app.go index e2c365a..974bc8c 100644 --- a/app/app.go +++ b/app/app.go @@ -415,10 +415,11 @@ func (app *application) ConfigureConnections(onion string, listen bool, peers bo profile.Listen() } - app.eventBuses[profile.GetOnion()].Publish(event.NewEventList(event.ResumeRetries)) // do this in the background, for large contact lists it can take a long time... go profile.StartConnections(peers, servers) + } else { + log.Errorf("profile does not exist %v", onion) } } diff --git a/functionality/servers/servers_functionality.go b/functionality/servers/servers_functionality.go index a1a3bfc..aad78c8 100644 --- a/functionality/servers/servers_functionality.go +++ b/functionality/servers/servers_functionality.go @@ -87,10 +87,11 @@ type Server struct { } // PublishServerUpdate serializes the current list of group servers and publishes an event with this information -func (f *Functionality) PublishServerUpdate(profile peer.CwtchPeer) { +func (f *Functionality) PublishServerUpdate(profile peer.CwtchPeer) error { serverListForOnion := f.GetServerInfoList(profile) - serversListBytes, _ := json.Marshal(serverListForOnion) + serversListBytes, err := json.Marshal(serverListForOnion) profile.PublishEvent(event.NewEvent(UpdateServerInfo, map[event.Field]string{"ProfileOnion": profile.GetOnion(), ServerList: string(serversListBytes)})) + return err } // GetServerInfoList compiles all the information the UI might need regarding all servers..