diff --git a/src/upnp.py b/src/upnp.py index 00d27b68..0f34e7fd 100644 --- a/src/upnp.py +++ b/src/upnp.py @@ -209,6 +209,7 @@ class uPnPThread(threading.Thread): for router in self.routers: if router.extPort is None: self.createPortMapping(router) + self.sock.close() for router in self.routers: if router.extPort is not None: self.deletePortMapping(router)