[Fix] fix shutdown of handlers
This commit is contained in:
parent
15c9eb731d
commit
206c997f5a
|
@ -149,8 +149,6 @@ public class DefaultPlcHandler extends StrolchComponent implements PlcHandler, P
|
|||
@Override
|
||||
public void stop() throws Exception {
|
||||
stopPlc();
|
||||
if (this.ctx != null)
|
||||
getContainer().getPrivilegeHandler().invalidate(this.ctx.getCertificate());
|
||||
|
||||
this.run = false;
|
||||
if (this.messageSenderTask != null)
|
||||
|
@ -158,6 +156,9 @@ public class DefaultPlcHandler extends StrolchComponent implements PlcHandler, P
|
|||
if (this.updateStateTask != null)
|
||||
this.updateStateTask.cancel(true);
|
||||
|
||||
if (this.ctx != null)
|
||||
getContainer().getPrivilegeHandler().invalidate(this.ctx.getCertificate());
|
||||
|
||||
super.stop();
|
||||
}
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ public class PlcGwClientHandler extends StrolchComponent implements GlobalPlcLis
|
|||
this.run = false;
|
||||
this.authenticated = false;
|
||||
if (this.messageSenderTask != null)
|
||||
this.messageSenderTask.cancel(false);
|
||||
this.messageSenderTask.cancel(true);
|
||||
|
||||
notifyPlcConnectionState(ConnectionState.Disconnected);
|
||||
|
||||
|
|
Loading…
Reference in New Issue