Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/transport/raw/TCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ constexpr int kListenBacklogSize = 2;

} // namespace

TCPBase::~TCPBase()
{
// Call Close to free the listening socket and close all active connections.
Close();
}
TCPBase::~TCPBase() = default;

void TCPBase::CloseActiveConnections()
{
Expand Down
8 changes: 7 additions & 1 deletion src/transport/raw/TCP.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,13 @@ class TCP : public TCPBase
}
}

~TCP() override { mPendingPackets.ReleaseAll(); }
~TCP() override
{
mPendingPackets.ReleaseAll();

// Call Close to free the listening socket and close all active connections.
Close();
}

private:
ActiveTCPConnectionState mConnectionsBuffer[kActiveConnectionsSize];
Expand Down
Loading