Close socket after uPnP request

This commit is contained in:
shortcutme 2016-10-03 19:26:06 +02:00
parent 1849547133
commit 3774630476
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ def perform_m_search(local_ip):
return sock.recv(2048)
except socket.error:
raise UpnpError("No reply from IGD using {} as IP".format(local_ip))
finally:
sock.close()
def _retrieve_location_from_ssdp(response):