diff --git a/rtc_base/virtual_socket_server.cc b/rtc_base/virtual_socket_server.cc index 5b0d3afc73..043d15a082 100644 --- a/rtc_base/virtual_socket_server.cc +++ b/rtc_base/virtual_socket_server.cc @@ -54,7 +54,6 @@ const int NUM_SAMPLES = 1000; enum { MSG_ID_PACKET, - MSG_ID_ADDRESS_BOUND, MSG_ID_CONNECT, MSG_ID_DISCONNECT, MSG_ID_SIGNALREADEVENT, @@ -377,8 +376,6 @@ void VirtualSocket::OnMessage(Message* pmsg) { SignalCloseEvent(this, error); } } - } else if (pmsg->message_id == MSG_ID_ADDRESS_BOUND) { - SignalAddressReady(this, GetLocalAddress()); } else if (pmsg->message_id == MSG_ID_SIGNALREADEVENT) { if (!recv_buffer_.empty()) { SignalReadEvent(this); @@ -696,13 +693,7 @@ int VirtualSocketServer::Bind(VirtualSocket* socket, SocketAddress normalized(addr.ipaddr().Normalized(), addr.port()); AddressMap::value_type entry(normalized, socket); - if (bindings_->insert(entry).second) { - // Post a message here such that test case could have chance to - // process the local address. (i.e. SetAlternativeLocalAddress). - msg_queue_->Post(RTC_FROM_HERE, socket, MSG_ID_ADDRESS_BOUND); - return 0; - } - return -1; + return bindings_->insert(entry).second ? 0 : -1; } int VirtualSocketServer::Bind(VirtualSocket* socket, SocketAddress* addr) { diff --git a/rtc_base/virtual_socket_server.h b/rtc_base/virtual_socket_server.h index cec52250f2..a6e1f642aa 100644 --- a/rtc_base/virtual_socket_server.h +++ b/rtc_base/virtual_socket_server.h @@ -369,9 +369,6 @@ class VirtualSocket : public AsyncSocket, // Removes stale packets from the network. Returns current size. size_t PurgeNetworkPackets(int64_t cur_time); - // For testing purpose only. Fired when client socket is bound to an address. - sigslot::signal2 SignalAddressReady; - private: struct NetworkEntry { size_t size;