diff options
-rw-r--r-- | third_party/libjingle/files/talk/base/physicalsocketserver.cc | 8 | ||||
-rw-r--r-- | third_party/libjingle/files/talk/xmpp/xmppclient.cc | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/third_party/libjingle/files/talk/base/physicalsocketserver.cc b/third_party/libjingle/files/talk/base/physicalsocketserver.cc index 1eb9f3a..b05b44c 100644 --- a/third_party/libjingle/files/talk/base/physicalsocketserver.cc +++ b/third_party/libjingle/files/talk/base/physicalsocketserver.cc @@ -168,7 +168,13 @@ public: SocketAddress addr2(addr); if (addr2.IsUnresolved()) { LOG(INFO) << "Resolving addr in PhysicalSocket::Connect"; - addr2.Resolve(); // TODO: Do this async later? + // TODO: Do this async later? + if (!addr2.Resolve()) { + LOG(LS_ERROR) << "Resolving addr failed"; + UpdateLastError(); + Close(); + return SOCKET_ERROR; + } } sockaddr_in saddr; addr2.ToSockAddr(&saddr); diff --git a/third_party/libjingle/files/talk/xmpp/xmppclient.cc b/third_party/libjingle/files/talk/xmpp/xmppclient.cc index c8e9a4b3..41cb77d 100644 --- a/third_party/libjingle/files/talk/xmpp/xmppclient.cc +++ b/third_party/libjingle/files/talk/xmpp/xmppclient.cc @@ -259,6 +259,8 @@ int XmppClient::ProcessStartXmppLogin() { // Done with pre-connect tasks - connect! if (!d_->socket_->Connect(d_->server_)) { + d_->pre_engine_error_ = XmppEngine::ERROR_SOCKET; + d_->pre_engine_subcode_ = d_->socket_->GetError(); EnsureClosed(); return STATE_ERROR; } |