Reset connection list on UPnP
- reset the already attempted connection list after UPnP port mapping is established. This allows to resubmit externally reachable port
This commit is contained in:
parent
59e1739136
commit
42246f83ef
|
@ -220,6 +220,11 @@ class uPnPThread(threading.Thread, StoppableThread):
|
||||||
self.routers.append(newRouter)
|
self.routers.append(newRouter)
|
||||||
self.createPortMapping(newRouter)
|
self.createPortMapping(newRouter)
|
||||||
queues.UISignalQueue.put(('updateStatusBar', tr._translate("MainWindow",'UPnP port mapping established on port %1').arg(str(self.extPort))))
|
queues.UISignalQueue.put(('updateStatusBar', tr._translate("MainWindow",'UPnP port mapping established on port %1').arg(str(self.extPort))))
|
||||||
|
# retry connections so that the submitted port is refreshed
|
||||||
|
with shared.alreadyAttemptedConnectionsListLock:
|
||||||
|
shared.alreadyAttemptedConnectionsList.clear()
|
||||||
|
shared.alreadyAttemptedConnectionsListResetTime = int(
|
||||||
|
time.time())
|
||||||
break
|
break
|
||||||
except socket.timeout as e:
|
except socket.timeout as e:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue
Block a user