mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 03:07:47 +00:00
[dtls] return error on multiple calls to Dtls::Open() (#3709)
This commit is contained in:
@@ -161,6 +161,8 @@ otError Dtls::Open(ReceiveHandler aReceiveHandler, ConnectedHandler aConnectedHa
|
||||
{
|
||||
otError error;
|
||||
|
||||
VerifyOrExit(mState == kStateClosed, error = OT_ERROR_ALREADY);
|
||||
|
||||
SuccessOrExit(error = mSocket.Open(&Dtls::HandleUdpReceive, this));
|
||||
|
||||
mReceiveHandler = aReceiveHandler;
|
||||
|
||||
Reference in New Issue
Block a user