in spectator/publisher.cc [96:108]
void SpectatordPublisher::udp_reconnect(
const asio::ip::udp::endpoint& endpoint) {
try {
if (udp_socket_.is_open()) {
udp_socket_.close();
}
udp_socket_.open(asio::ip::udp::v6());
udp_socket_.connect(endpoint);
} catch (std::exception& e) {
logger_->warn("Unable to connect to {}: {}", endpoint.address().to_string(),
endpoint.port());
}
}