Move uPnP port remove to fileserver

This commit is contained in:
shortcutme 2016-10-02 14:22:01 +02:00
parent 2ab04deded
commit 31077eb346
3 changed files with 13 additions and 12 deletions

View file

@ -13,7 +13,6 @@ from Config import config
from Crypt import CryptConnection
from Crypt import CryptHash
from Tor import TorManager
from util import UpnpPunch
class ConnectionServer:
@ -74,13 +73,6 @@ class ConnectionServer:
self.log.info("StreamServer bind error, must be running already: %s" % err)
def stop(self):
self.log.debug('Closing port %d' % self.port)
if self.running:
try:
UpnpPunch.ask_to_close_port(self.port)
self.log.info('Closed port via upnp.')
except (UpnpPunch.UpnpError, UpnpPunch.IGDError), err:
self.log.info("Failed at attempt to use upnp to close port: %s" %err)
self.running = False
self.stream_server.stop()