forked from cwtch.im/cwtch
Prevent loading a nil tapir service before tor has started
This commit is contained in:
parent
a4064b1872
commit
6b0d9827fb
|
@ -444,8 +444,9 @@ func (e *engine) receiveGroupMessage(server string, gm *groups.EncryptedGroupMes
|
|||
func (e *engine) sendMessageToGroup(groupID string, server string, ct []byte, sig []byte) {
|
||||
|
||||
es, ok := e.ephemeralServices.Load(server)
|
||||
if !ok {
|
||||
if es == nil || !ok {
|
||||
e.eventManager.Publish(event.NewEvent(event.SendMessageToGroupError, map[event.Field]string{event.GroupID: groupID, event.GroupServer: server, event.Error: "server-not-found", event.Signature: base64.StdEncoding.EncodeToString(sig)}))
|
||||
return
|
||||
}
|
||||
ephemeralService := es.(tapir.Service)
|
||||
|
||||
|
|
Loading…
Reference in New Issue