summaryrefslogtreecommitdiffstats
path: root/remoting/client
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-09 23:26:06 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-09 23:26:06 +0000
commit20b26c18973dcbe4b324d797eca0f7b1f759a9cc (patch)
treed8dab628534b27dde7532d80f906bd45db287c48 /remoting/client
parent74605d4168f043a8d6ec6d255bcf19319311c0df (diff)
downloadchromium_src-20b26c18973dcbe4b324d797eca0f7b1f759a9cc.zip
chromium_src-20b26c18973dcbe4b324d797eca0f7b1f759a9cc.tar.gz
chromium_src-20b26c18973dcbe4b324d797eca0f7b1f759a9cc.tar.bz2
Ignore all sendto() errors for P2P sockets on the client side.
This is a workaround for the linked bug. BUG=135210 Review URL: https://chromiumcodereview.appspot.com/10752005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client')
-rw-r--r--remoting/client/plugin/pepper_packet_socket_factory.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/remoting/client/plugin/pepper_packet_socket_factory.cc b/remoting/client/plugin/pepper_packet_socket_factory.cc
index f83180b..f5677c9 100644
--- a/remoting/client/plugin/pepper_packet_socket_factory.cc
+++ b/remoting/client/plugin/pepper_packet_socket_factory.cc
@@ -270,8 +270,24 @@ void UdpPacketSocket::OnSendCompleted(int result) {
if (result != PP_ERROR_ABORTED) {
LOG(ERROR) << "Send failed on a UDP socket: " << result;
}
- error_ = EINVAL;
- return;
+
+ // OS (e.g. OSX) may return EHOSTUNREACH when the peer has the
+ // same subnet address as the local host but connected to a
+ // different network. That error must be ingored because the
+ // socket may still be useful for other ICE canidadates (e.g. for
+ // STUN candidates with a different address). Unfortunately pepper
+ // interface currently returns PP_ERROR_FAILED for any error (see
+ // crbug.com/136406). It's not possible to distinguish that case
+ // from other errors and so we have to ingore all of them. This
+ // behavior matchers the libjingle's AsyncUDPSocket used by the
+ // host.
+ //
+ // TODO(sergeyu): Once implementation of the Pepper UDP interface
+ // is fixed, uncomment the code below, but ignore
+ // host-unreacheable error.
+
+ // error_ = EINVAL;
+ // return;
}
send_queue_size_ -= send_queue_.front().data->size();