Fix obvious port leak in TunnelManager
In retrospect adding the timeout here coresponds quite well to when
we started to see more crashes due to port allocation errors. It's a
testiment to the speed and reliability of DNS that we ran out of ports
infreqently enough that I didn't notice this right away.
@@ -622,12 +622,13 @@ impl TunnelManager {
}
Err(e) => {
warn!("Actor mailbox failure from DNS resolver! {:?}", e);
- // We might need a port callback here
+ TunnelManager::from_registry().do_send(PortCallback(our_port));
Ok(())
}
Ok(Err(e)) => {
warn!("DNS resolution failed with {:?}", e);
+ TunnelManager::from_registry().do_send(PortCallback(our_port));
Ok(())
}
});
