- socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), Config::instance()->server_port_base() + 1));
- socket->write (xml.length() + 1);
- socket->write ((uint8_t *) xml.c_str(), xml.length() + 1);
+ auto socket = make_shared<Socket>();
+ socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), MAIN_SERVER_PRESENCE_PORT));
+ socket->write (xml.bytes() + 1);
+ socket->write ((uint8_t *) xml.c_str(), xml.bytes() + 1);
+ } catch (...) {
+
+ }
+
+ try {
+ auto socket = make_shared<Socket>();
+ socket->connect (boost::asio::ip::tcp::endpoint (_broadcast.send_endpoint.address(), BATCH_SERVER_PRESENCE_PORT));
+ socket->write (xml.bytes() + 1);
+ socket->write ((uint8_t *) xml.c_str(), xml.bytes() + 1);