From bf080a205ff3b9b26dcdda4438de0b6b96108e05 Mon Sep 17 00:00:00 2001 From: Brian Hoffman Date: Sat, 9 Nov 2019 11:30:07 -0500 Subject: [PATCH] Send relay message to all configured relays --- net/web_relay_manager.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/web_relay_manager.go b/net/web_relay_manager.go index f35b05d8d8..b4e52b6ad5 100644 --- a/net/web_relay_manager.go +++ b/net/web_relay_manager.go @@ -192,8 +192,10 @@ func (wrm *WebRelayManager) SendRelayMessage(ciphertext string, recipient string outgoing, _ := json.Marshal(typedmessage) log.Debugf("Sending encrypted relay message: %s", string(outgoing)) - // Transmit the encrypted message to the webrelay - wrm.authToWebRelay(wrm.webrelays[0], outgoing) + // Transmit the encrypted message to each configured web relay + for _, relay := range wrm.webrelays { + wrm.authToWebRelay(relay, outgoing) + } } func (wrm *WebRelayManager) authToWebRelay(server string, msg []byte) { @@ -205,7 +207,6 @@ func (wrm *WebRelayManager) authToWebRelay(server string, msg []byte) { } else { log.Debugf("Successfully sent message to relay: %s\n", conn.RemoteAddr()) } - } }