mirror of
https://gitlab.com/Monsterovich/lanemu.git
synced 2024-07-07 06:01:16 +02:00
Fixed bug: upnp status sometimes not updated
This commit is contained in:
parent
a2afb3cab6
commit
b87208883e
|
@ -105,7 +105,7 @@ public class InfoWindow extends javax.swing.JFrame implements RoutungTableListen
|
|||
"ID: " + connectionManager.getLocalAddr() +
|
||||
" Port: " + connectionManager.getServerPort());
|
||||
connectionManager.getRouter().addTableListener(InfoWindow.this);
|
||||
connectionManager.getUPnPPortForward().addListener(InfoWindow.this);
|
||||
connectionManager.getUPnPPortForward().addListener(InfoWindow.this, true);
|
||||
}
|
||||
peerGraph.setConnectionManager(connectionManager);
|
||||
}
|
||||
|
|
|
@ -120,10 +120,14 @@ public class UPnPPortForward {
|
|||
* Set the object of the upperlayer.
|
||||
*
|
||||
* @param l the upper layer
|
||||
* @param refresh update the listener after adding
|
||||
*/
|
||||
public void addListener(UPnPPortForwardListener l) {
|
||||
public void addListener(UPnPPortForwardListener l, boolean refresh) {
|
||||
synchronized (listeners) {
|
||||
listeners.add(l);
|
||||
if (refresh) {
|
||||
l.upnpChanged(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue