diff --git a/src/modules/udp_transport/source/udp_socket_windows.cc b/src/modules/udp_transport/source/udp_socket_windows.cc index 33d0d202a4..181943610b 100644 --- a/src/modules/udp_transport/source/udp_socket_windows.cc +++ b/src/modules/udp_transport/source/udp_socket_windows.cc @@ -301,59 +301,6 @@ void UdpSocketWindows::HasIncoming() } } -void UdpSocketWindows::CleanUp() -{ - WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id, - "UdpSocketWindows::CleanUp()"); - _wantsIncoming = false; - - if(_clientHandle != INVALID_HANDLE_VALUE) - { - assert(_filterHandle != INVALID_HANDLE_VALUE); - assert(_flowHandle != INVALID_HANDLE_VALUE); - - if (_gtc) - { - _gtc->TcDeleteFilter(_filterHandle); - _gtc->TcDeleteFlow(_flowHandle); - _gtc->TcDeregisterClient(_clientHandle); - } - - _clientHandle = INVALID_HANDLE_VALUE; - _filterHandle = INVALID_HANDLE_VALUE; - _flowHandle = INVALID_HANDLE_VALUE; - } - - while(!_notSentPackets.Empty()) - { - UDPPacket* packet = (UDPPacket*)_notSentPackets.First()->GetItem(); - if(!packet) - { - break; - } - delete packet; - _notSentPackets.PopFront(); - } - - if (_socket != INVALID_SOCKET) - { - if (closesocket(_socket) == SOCKET_ERROR) - { - WEBRTC_TRACE(kTraceError, kTraceTransport, _id, - "closesocket() => error = %d", WSAGetLastError()); - } - WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id, - "WinSock::closesocket() done"); - - if(_addedToMgr) - { - WEBRTC_TRACE(kTraceDebug, kTraceTransport, _id, - "calling UdpSocketManager::RemoveSocket()"); - _mgr->RemoveSocket(this); - } - } -} - void UdpSocketWindows::SetWritable() { // Try to send packets that have been queued up. diff --git a/src/modules/udp_transport/source/udp_socket_windows.h b/src/modules/udp_transport/source/udp_socket_windows.h index 0bbd20deb8..8edcc005f7 100644 --- a/src/modules/udp_transport/source/udp_socket_windows.h +++ b/src/modules/udp_transport/source/udp_socket_windows.h @@ -53,7 +53,6 @@ public: virtual WebRtc_Word32 SetTOS(const WebRtc_Word32 serviceType); protected: - void CleanUp(); void HasIncoming(); // Socket is free to process pending packets. void SetWritable();