diff options
| author | aozima <[email protected]> | 2014-06-14 21:49:46 +0800 |
|---|---|---|
| committer | aozima <[email protected]> | 2014-06-14 21:49:46 +0800 |
| commit | f296c582a54480395ea6a420673b6689d282e17f (patch) | |
| tree | 4f61aa21b3dfb970c65fab2b969f54bfb765690c | |
| parent | fbe4d59db2bf41cfab60c3333a3e1bea8cc4d74a (diff) | |
fixed bug: close socket when ping() exit.
| -rw-r--r-- | components/net/lwip-1.3.2/apps/ping.c | 2 | ||||
| -rw-r--r-- | components/net/lwip/apps/ping.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/components/net/lwip-1.3.2/apps/ping.c b/components/net/lwip-1.3.2/apps/ping.c index d3c3dd399b..1360c932fa 100644 --- a/components/net/lwip-1.3.2/apps/ping.c +++ b/components/net/lwip-1.3.2/apps/ping.c @@ -166,6 +166,8 @@ rt_err_t ping(char* target, rt_uint32_t time, rt_size_t size) rt_thread_delay(PING_DELAY); /* take a delay */ } + + lwip_close(s); return RT_EOK; } diff --git a/components/net/lwip/apps/ping.c b/components/net/lwip/apps/ping.c index d3c3dd399b..1360c932fa 100644 --- a/components/net/lwip/apps/ping.c +++ b/components/net/lwip/apps/ping.c @@ -166,6 +166,8 @@ rt_err_t ping(char* target, rt_uint32_t time, rt_size_t size) rt_thread_delay(PING_DELAY); /* take a delay */ } + + lwip_close(s); return RT_EOK; } |
