examples/http_client*: Be sure to close socket.

Otherwise, on bare-metal/RTOS systems can lead to resource leaks.
pull/2257/head
Paul Sokolovsky 2016-07-23 00:41:19 +03:00
rodzic a53e0e59f3
commit 614deb82c7
2 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -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()

Wyświetl plik

@ -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()