UPNP ports not closing

I have tried two different modem routers both based on versions of OpenWrt, both behave the same. When I run Tribler they open two ports for Tribler. When I close Tribler the ports remain open meaning I get a ever growing list of open ports on the router. When I use Qbittorent the ports open, but when I close Qbittorent the ports immediately close . Is this a Tribler bug or a OpenWrt one.

@speedy I’m not sure if it is a Tribler bug or even OpenWRT bug.

First, Tribler is a peer-to-peer bittorrent client so you rely on the network peers to get content in Tribler. There are no central servers hosted by us that provides content. This is fundamentally different from Qbittorrent. Being p2p application, you open a few random ports to help relay the traffic in the network. These are UDP ports and might still receive some packets for a while even after Tribler is closed because the peers you were connected to tries to ping you to keep the network alive.