Skip to content
Snippets Groups Projects
Commit 671c55a0 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dhtrunner: print peer discovery error message to cerr

parent a4f2e6ef
Branches
Tags
No related merge requests found
...@@ -138,13 +138,13 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner:: ...@@ -138,13 +138,13 @@ DhtRunner::run(const SockAddr& local4, const SockAddr& local6, const DhtRunner::
if (config.peer_discovery or config.peer_publish) { if (config.peer_discovery or config.peer_publish) {
try { try {
peerDiscovery4_.reset(new PeerDiscovery(AF_INET, port_multicast)); peerDiscovery4_.reset(new PeerDiscovery(AF_INET, port_multicast));
} catch(std::exception &exception){ } catch(const std::exception& e){
perror(exception.what()); std::cerr << "Can't start peer discovery (IPv4): " << e.what() << std::endl;
} }
try { try {
peerDiscovery6_.reset(new PeerDiscovery(AF_INET6, port_multicast)); peerDiscovery6_.reset(new PeerDiscovery(AF_INET6, port_multicast));
} catch(std::exception &exception){ } catch(const std::exception& e) {
perror(exception.what()); std::cerr << "Can't start peer discovery (IPv6): " << e.what() << std::endl;
} }
} }
if (config.peer_discovery) { if (config.peer_discovery) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment