MCPcopy
hub / github.com/agalwood/Motrix / startUPnPMapping

Method startUPnPMapping

src/main/Application.js:319–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

317 }
318
319 async startUPnPMapping () {
320 const btPort = this.configManager.getSystemConfig('listen-port')
321 const dhtPort = this.configManager.getSystemConfig('dht-listen-port')
322
323 const promises = [
324 this.upnp.map(btPort),
325 this.upnp.map(dhtPort)
326 ]
327 try {
328 await Promise.allSettled(promises)
329 } catch (e) {
330 logger.warn('[Motrix] start UPnP mapping fail', e.message)
331 }
332 }
333
334 async stopUPnPMapping () {
335 const btPort = this.configManager.getSystemConfig('listen-port')

Callers 2

initUPnPManagerMethod · 0.95

Calls 2

getSystemConfigMethod · 0.80
mapMethod · 0.80

Tested by

no test coverage detected