examples/http_client*: Be sure to close socket.

Otherwise, on bare-metal/RTOS systems can lead to resource leaks.
This commit is contained in:
Paul Sokolovsky 2016-07-23 00:41:19 +03:00
parent a53e0e59f3
commit 614deb82c7
2 changed files with 4 additions and 0 deletions

View File

@ -24,5 +24,7 @@ def main(use_stream=False):
s.send(b"GET / HTTP/1.0\n\n")
print(s.recv(4096))
s.close()
main()

View File

@ -32,5 +32,7 @@ def main(use_stream=True):
s.send(b"GET / HTTP/1.0\n\n")
print(s.recv(4096))
s.close()
main()