|
|
@@ -92,7 +92,9 @@ public class AliBridgeServer extends AbstractClusterUniqueTask<AliBridgeServer>
|
|
|
refreshBridgeConfig(params);
|
|
|
params.setDeviceName(bridgeConfigManager.getDeviceName());
|
|
|
if(bootstrap!=null){
|
|
|
- bootstrap.disconnectBridge();
|
|
|
+ try {
|
|
|
+ bootstrap.disconnectBridge();
|
|
|
+ }catch (Exception e){}
|
|
|
start.set(false);
|
|
|
}
|
|
|
bootstrap=new DefaultBridgeBootstrap(params.getId(),bridgeConfigManager);
|
|
|
@@ -276,7 +278,9 @@ public class AliBridgeServer extends AbstractClusterUniqueTask<AliBridgeServer>
|
|
|
public Mono<Void> pauseBridge(boolean broadcast ) {
|
|
|
return Mono.fromRunnable(()->{
|
|
|
if(bootstrap!=null&&!isReplica()){
|
|
|
- bootstrap.disconnectBridge();
|
|
|
+ try {
|
|
|
+ bootstrap.disconnectBridge();
|
|
|
+ }catch (Exception e){}
|
|
|
}
|
|
|
changeStatus(BridgeStatus.stop,broadcast);
|
|
|
log.info("网桥[{}]关闭",id);
|
|
|
@@ -287,7 +291,9 @@ public class AliBridgeServer extends AbstractClusterUniqueTask<AliBridgeServer>
|
|
|
public Mono<Void> delBridge(boolean broadcast) {
|
|
|
return Mono.fromRunnable(()->{
|
|
|
if(bootstrap!=null&&!isReplica()){
|
|
|
- bootstrap.disconnectBridge();
|
|
|
+ try {
|
|
|
+ bootstrap.disconnectBridge();
|
|
|
+ }catch (Exception e){}
|
|
|
bootstrap=null;
|
|
|
}
|
|
|
changeStatus(BridgeStatus.del,broadcast);
|