Network: Close the UDP endpoint in destructor.
This commit is contained in:
parent
29e267cac0
commit
0aff42a4bc
@ -197,6 +197,15 @@ cUDPEndpointImpl::cUDPEndpointImpl(UInt16 a_Port, cUDPEndpoint::cCallbacks & a_C
|
||||
|
||||
|
||||
|
||||
cUDPEndpointImpl::~cUDPEndpointImpl()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void cUDPEndpointImpl::Close(void)
|
||||
{
|
||||
if (m_Port == 0)
|
||||
|
@ -35,6 +35,8 @@ public:
|
||||
If a_Port is 0, the OS is free to assign any port number it likes to the endpoint. */
|
||||
cUDPEndpointImpl(UInt16 a_Port, cUDPEndpoint::cCallbacks & a_Callbacks);
|
||||
|
||||
~cUDPEndpointImpl();
|
||||
|
||||
// cUDPEndpoint overrides:
|
||||
virtual void Close(void) override;
|
||||
virtual bool IsOpen(void) const override;
|
||||
|
Loading…
Reference in New Issue
Block a user