mirror of https://github.com/qt/qtcoap.git
Close the DTLS connection during destruction
Change-Id: Id7bc8ac1506ae543c7964b0bdcacf39588cd7334 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
This commit is contained in:
parent
d1e1548ccf
commit
64b696e517
|
@ -164,6 +164,16 @@ QCoapQUdpConnectionPrivate::QCoapQUdpConnectionPrivate(QtCoap::SecurityMode secu
|
|||
{
|
||||
}
|
||||
|
||||
QCoapQUdpConnectionPrivate::~QCoapQUdpConnectionPrivate()
|
||||
{
|
||||
#if QT_CONFIG(dtls)
|
||||
if (dtls && dtls->isConnectionEncrypted()) {
|
||||
Q_ASSERT(udpSocket);
|
||||
dtls->shutdown(udpSocket);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ class Q_AUTOTEST_EXPORT QCoapQUdpConnectionPrivate : public QCoapConnectionPriva
|
|||
{
|
||||
public:
|
||||
QCoapQUdpConnectionPrivate(QtCoap::SecurityMode security = QtCoap::NoSec);
|
||||
~QCoapQUdpConnectionPrivate() override;
|
||||
|
||||
virtual bool bind();
|
||||
|
||||
|
|
Loading…
Reference in New Issue