}
});
// Auto-refresh mappings every minute when enabled.
final BooleanParameter auto_refresh_on_bad_nat_param = upnp_config.addBooleanParameter2( "upnp.refresh_on_bad_nat", "upnp.refresh_mappings_on_bad_nat", false);
plugin_interface.getUtilities().createTimer("upnp mapping auto-refresh", true).addPeriodicEvent(1*60*1000, new UTTimerEventPerformer() {
private long last_bad_nat = 0;
public void perform(UTTimerEvent event) {
if (upnp == null) {return;}
if (!auto_refresh_on_bad_nat_param.getValue()) {return;}
if (!upnp_enable_param.getValue()) {return;}