Index: webrtc/p2p/client/basicportallocator.cc |
diff --git a/webrtc/p2p/client/basicportallocator.cc b/webrtc/p2p/client/basicportallocator.cc |
index 22abf33e93639d90b276ca9d6c5cc025fca3a6e0..ae79aea26872bdda92a7a83cbc66f6b1489b4873 100644 |
--- a/webrtc/p2p/client/basicportallocator.cc |
+++ b/webrtc/p2p/client/basicportallocator.cc |
@@ -1083,7 +1083,7 @@ void AllocationSequence::OnReadPacket( |
for (std::vector<TurnPort*>::const_iterator it = turn_ports_.begin(); |
it != turn_ports_.end(); ++it) { |
TurnPort* port = *it; |
- if (port->server_address().address == remote_addr) { |
+ if (port->SharedSocket() && port->server_address().address == remote_addr) { |
honghaiz
2016/04/19 05:32:20
I think it is better to still let the TurnPort eat
Sergey Ulanov
2016/04/20 20:50:56
The packet will be passed to a stun port only when
honghaiz3
2016/04/22 01:49:02
It will be passed to the stun port because the con
|
port->HandleIncomingPacket(socket, data, size, remote_addr, packet_time); |
turn_port_found = true; |
break; |
@@ -1097,6 +1097,7 @@ void AllocationSequence::OnReadPacket( |
// the TURN server is also a STUN server. |
if (!turn_port_found || |
stun_servers.find(remote_addr) != stun_servers.end()) { |
+ RTC_DCHECK(udp_port_->SharedSocket()); |
udp_port_->HandleIncomingPacket( |
socket, data, size, remote_addr, packet_time); |
} |