MCPcopy Create free account
hub / github.com/apache/trafficserver / ~UnixUDPConnection

Method ~UnixUDPConnection

src/iocore/net/UnixUDPConnection.cc:42–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40} // end anonymous namespace
41
42UnixUDPConnection::~UnixUDPConnection()
43{
44 UDPPacket *p = nullptr;
45
46 SList(UDPPacket, alink) aq(inQueue.popall());
47
48 if (!tobedestroyed) {
49 tobedestroyed = 1;
50 }
51
52 while ((p = aq.pop())) {
53 p->free();
54 }
55 if (callbackAction) {
56 callbackAction->cancel();
57 callbackAction = nullptr;
58 }
59 Dbg(dbg_ctl_udpnet, "Destroying udp port = %d", getPortNum());
60 if (sock.is_ok()) {
61 sock.close();
62 }
63}
64
65// called with continuation lock taken out
66// We call Release because AddRef was called before entering here.

Callers

nothing calls this directly

Calls 6

popallMethod · 0.80
popMethod · 0.45
freeMethod · 0.45
cancelMethod · 0.45
is_okMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected