Not broadcasting to additional addresses

This commit is contained in:
Dennis Schwerdel 2016-08-12 08:35:09 +02:00
parent 1da38f5205
commit 5e7d3b5e08
1 changed files with 2 additions and 2 deletions

View File

@ -238,8 +238,8 @@ impl<P: Protocol> GenericCloud<P> {
debug!("Broadcasting {:?}", msg);
// Encrypt and encode once and send several times
let msg_data = encode(msg, &mut self.buffer_out, self.magic, &mut self.crypto);
for addr in self.peers.as_vec() {
let socket = match addr {
for addr in self.peers.peers.keys() {
let socket = match *addr {
SocketAddr::V4(_) => &self.socket4,
SocketAddr::V6(_) => &self.socket6
};