diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-02-09 22:28:38 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-02-09 22:28:38 +0000 |
| commit | 02c400669a490617969a8f3924dd0bce0840a7b8 (patch) | |
| tree | ab50d1a88b1383318dd44c2e9ba9880d818546c2 /src | |
| parent | e4b65ba64c319281d6bff15e950ebce697c9621a (diff) | |
Ignore exceptions from send_to on server-search broadcast.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/server_finder.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/server_finder.cc b/src/lib/server_finder.cc index c4d3dc357..3d5825ad4 100644 --- a/src/lib/server_finder.cc +++ b/src/lib/server_finder.cc @@ -65,8 +65,12 @@ try while (1) { if (Config::instance()->use_any_servers ()) { /* Broadcast to look for servers */ - boost::asio::ip::udp::endpoint end_point (boost::asio::ip::address_v4::broadcast(), Config::instance()->server_port_base() + 1); - socket.send_to (boost::asio::buffer (data.c_str(), data.size() + 1), end_point); + try { + boost::asio::ip::udp::endpoint end_point (boost::asio::ip::address_v4::broadcast(), Config::instance()->server_port_base() + 1); + socket.send_to (boost::asio::buffer (data.c_str(), data.size() + 1), end_point); + } catch (...) { + + } } /* Query our `definite' servers (if there are any) */ |
