RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
795 stars 260 forks source link

[Bug]: Starting a server with UPnP tries too many interfaces and takes too long #4902

Open kwvanderlinde opened 1 month ago

kwvanderlinde commented 1 month ago

Describe the Bug

Prior to MapTool 1.15.0, starting a UPnP server would scan only a few possible interfaces while searching for UPnP-enabled gateways. Since 1.15.0, specifically on Windows, a dozen or more interfaces are checked. Since each one takes a few seconds, starting a server with UPnP can now take upwards of a minute.

To Reproduce

  1. On Windows, open MapTool 1.15.0
  2. Go to File > Start Server
  3. Make sure the Use UPnP option is selected.
  4. Click OK
  5. Wait forever while dialogs show different interfaces being tried.

Expected Behaviour

Only "meaningful" interfaces are scanned for gateways, i.e., interfaces with an associated IP address and which can reasonable be expected to be associated with a UPnP-enabled gateway.

Screenshots

No response

MapTool Info

1.15.0

Desktop

Windows 11

Additional Context

No response

kwvanderlinde commented 1 month ago

For this bug I'll focus on reducing the number of interfaces so UPnP performance is similar to 1.14. There are other possibilities for improving the UPnP experience, but we can open other issues for those.