MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / stop

Method stop

src/File/FileServer.py:367–376  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

365 self.log.debug("Stopped.")
366
367 def stop(self):
368 if self.running and self.portchecker.upnp_port_opened:
369 self.log.debug('Closing port %d' % self.port)
370 try:
371 self.portchecker.portClose(self.port)
372 self.log.info('Closed port via upnp.')
373 except Exception as err:
374 self.log.info("Failed at attempt to use upnp to close port: %s" % err)
375
376 return ConnectionServer.stop(self)

Callers 6

testPingMethod · 0.95
testDownloadFileMethod · 0.95
testHashfieldExchangeMethod · 0.95
testPexMethod · 0.95
testFindOptionalMethod · 0.95
testRangedFileRequestMethod · 0.95

Calls 1

portCloseMethod · 0.80

Tested by 6

testPingMethod · 0.76
testDownloadFileMethod · 0.76
testHashfieldExchangeMethod · 0.76
testPexMethod · 0.76
testFindOptionalMethod · 0.76
testRangedFileRequestMethod · 0.76