bind to all

This commit is contained in:
Anatoly Yakovenko 2018-04-26 13:54:29 -07:00
parent 48018b3f5b
commit d90ab90145
1 changed files with 1 additions and 3 deletions

View File

@ -168,9 +168,7 @@ impl Crdt {
// Lock the object only to do this operation and not for any longer // Lock the object only to do this operation and not for any longer
// especially not when doing the `sock.send_to` // especially not when doing the `sock.send_to`
let (remote_gossip_addr, req) = obj.read().unwrap().gossip_request(); let (remote_gossip_addr, req) = obj.read().unwrap().gossip_request();
let mut req_addr = remote_gossip_addr; let sock = UdpSocket::bind("0.0.0.0:0")?;
req_addr.set_port(0);
let sock = UdpSocket::bind(req_addr)?;
// TODO this will get chatty, so we need to first ask for number of updates since // TODO this will get chatty, so we need to first ask for number of updates since
// then only ask for specific data that we dont have // then only ask for specific data that we dont have
let r = serialize(&req)?; let r = serialize(&req)?;