summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index 99f1560..5715d5a 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -97,6 +97,11 @@ void createConnection(const PacketSourceEndpoint & remote_end, window_size_t seq
#endif
}
+void createConnectionError(const std::exception& e)
+{
+ gSignalController.inject(SIGERROR, e.what());
+}
+
#ifndef ANYTUN_NOSYNC
void syncConnector(const OptionHost& connto)
{
@@ -463,7 +468,7 @@ int main(int argc, char* argv[])
src = new UDPPacketSource(gOpt.getLocalAddr(), gOpt.getLocalPort());
if(gOpt.getRemoteAddr() != "")
- gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(), boost::bind(createConnection, _1, gOpt.getSeqWindowSize(), gOpt.getMux()), gOpt.getResolvAddrType());
+ gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(), boost::bind(createConnection, _1, gOpt.getSeqWindowSize(), gOpt.getMux()), boost::bind(createConnectionError, _1), gOpt.getResolvAddrType());
HostList connect_to = gOpt.getRemoteSyncHosts();
#ifndef NO_ROUTING