Remove dependency on MessageHandlerAutoCleanup from VirtualSocket

Bug: webrtc:11988
Change-Id: Ifeb901b110bd6c82922ae2560e4d508c6ed289d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194560
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32661}
This commit is contained in:
Tomas Gunnarsson 2020-11-21 16:20:23 +01:00 committed by Commit Bot
parent b5fde37192
commit d96634781e
2 changed files with 6 additions and 5 deletions

View File

@ -221,10 +221,11 @@ int VirtualSocket::Close() {
} }
delete data; delete data;
} }
// Clear incoming packets and disconnect messages }
if (server_->msg_queue_) {
server_->msg_queue_->Clear(this); // Clear incoming packets and disconnect messages
} if (server_->msg_queue_) {
server_->msg_queue_->Clear(this);
} }
state_ = CS_CLOSED; state_ = CS_CLOSED;

View File

@ -305,7 +305,7 @@ class VirtualSocketServer : public SocketServer, public sigslot::has_slots<> {
// Implements the socket interface using the virtual network. Packets are // Implements the socket interface using the virtual network. Packets are
// passed as messages using the message queue of the socket server. // passed as messages using the message queue of the socket server.
class VirtualSocket : public AsyncSocket, class VirtualSocket : public AsyncSocket,
public MessageHandlerAutoCleanup, public MessageHandler,
public sigslot::has_slots<> { public sigslot::has_slots<> {
public: public:
VirtualSocket(VirtualSocketServer* server, int family, int type, bool async); VirtualSocket(VirtualSocketServer* server, int family, int type, bool async);