Fixed assert failure on reconections

When the border router is switched off, the several retries will end up triggering the asserts in NanostackSocket::open. This is caused because socket_tbl elements, are never set to NULL.
pull/2841/head
javier-moreno-tridonic-com 2016-09-28 09:59:12 +02:00 committed by GitHub
parent 58c12f19b2
commit 51fd80bb63
1 changed files with 1 additions and 0 deletions

View File

@ -170,6 +170,7 @@ NanostackSocket::~NanostackSocket()
int ret = socket_free(socket_id);
MBED_ASSERT(0 == ret);
MBED_ASSERT(socket_tbl[socket_id] == this);
socket_tbl[socket_id] = NULL;
socket_id = -1;
data_free_all();
}