fixed bug: close socket when ping() exit.
This commit is contained in:
parent
fbe4d59db2
commit
f296c582a5
@ -167,6 +167,8 @@ rt_err_t ping(char* target, rt_uint32_t time, rt_size_t size)
|
|||||||
rt_thread_delay(PING_DELAY); /* take a delay */
|
rt_thread_delay(PING_DELAY); /* take a delay */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lwip_close(s);
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
#ifdef RT_USING_FINSH
|
#ifdef RT_USING_FINSH
|
||||||
|
@ -167,6 +167,8 @@ rt_err_t ping(char* target, rt_uint32_t time, rt_size_t size)
|
|||||||
rt_thread_delay(PING_DELAY); /* take a delay */
|
rt_thread_delay(PING_DELAY); /* take a delay */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lwip_close(s);
|
||||||
|
|
||||||
return RT_EOK;
|
return RT_EOK;
|
||||||
}
|
}
|
||||||
#ifdef RT_USING_FINSH
|
#ifdef RT_USING_FINSH
|
||||||
|
Loading…
x
Reference in New Issue
Block a user