[dtls] invoke callback after DTLS disconnect timeout (#3897)

This commit is contained in:
wgtdkp
2019-06-07 02:57:09 +08:00
committed by Jonathan Hui
parent c14cc60962
commit 49150943c1
+5 -5
View File
@@ -438,11 +438,6 @@ void Dtls::Disconnect(void)
new (&mPeerAddress) Ip6::MessageInfo();
mSocket.Connect(Ip6::SockAddr());
if (mConnectedHandler != NULL)
{
mConnectedHandler(mContext, false);
}
FreeMbedtls();
exit:
@@ -800,6 +795,11 @@ void Dtls::HandleTimer(void)
case kStateCloseNotify:
mState = kStateOpen;
mTimer.Stop();
if (mConnectedHandler != NULL)
{
mConnectedHandler(mContext, false);
}
break;
default: