mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-24 15:09:08 +00:00
netutils/dhcpc: Fix dhcpc lease bug
Signed-off-by: songlinzhang <songlinzhang@xiaomi.com>
This commit is contained in:
parent
a1857b9258
commit
04dd2d70fd
1 changed files with 2 additions and 0 deletions
|
|
@ -468,6 +468,7 @@ static void *dhcpc_run(void *args)
|
|||
else
|
||||
{
|
||||
pdhcpc->callback(NULL);
|
||||
memset(&result, 0, sizeof(result));
|
||||
nerr("dhcpc_request error\n");
|
||||
}
|
||||
|
||||
|
|
@ -476,6 +477,7 @@ static void *dhcpc_run(void *args)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
result.lease_time /= 2;
|
||||
while (result.lease_time)
|
||||
{
|
||||
result.lease_time = sleep(result.lease_time);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue