Skip to content
Snippets Groups Projects
Commit 614deb82 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

examples/http_client*: Be sure to close socket.

Otherwise, on bare-metal/RTOS systems can lead to resource leaks.
parent a53e0e59
No related branches found
No related tags found
No related merge requests found
...@@ -24,5 +24,7 @@ def main(use_stream=False): ...@@ -24,5 +24,7 @@ def main(use_stream=False):
s.send(b"GET / HTTP/1.0\n\n") s.send(b"GET / HTTP/1.0\n\n")
print(s.recv(4096)) print(s.recv(4096))
s.close()
main() main()
...@@ -32,5 +32,7 @@ def main(use_stream=True): ...@@ -32,5 +32,7 @@ def main(use_stream=True):
s.send(b"GET / HTTP/1.0\n\n") s.send(b"GET / HTTP/1.0\n\n")
print(s.recv(4096)) print(s.recv(4096))
s.close()
main() main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment