Exception handling
This commit is contained in:
parent
36ddbd365e
commit
f77afe8fae
|
@ -206,8 +206,14 @@ class uPnPThread(threading.Thread, StoppableThread):
|
||||||
for router in self.routers:
|
for router in self.routers:
|
||||||
if router.extPort is None:
|
if router.extPort is None:
|
||||||
self.createPortMapping(router)
|
self.createPortMapping(router)
|
||||||
|
try:
|
||||||
self.sock.shutdown(socket.SHUT_RDWR)
|
self.sock.shutdown(socket.SHUT_RDWR)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
self.sock.close()
|
self.sock.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
deleted = False
|
deleted = False
|
||||||
for router in self.routers:
|
for router in self.routers:
|
||||||
if router.extPort is not None:
|
if router.extPort is not None:
|
||||||
|
|
Reference in New Issue
Block a user