[BF] Catch Exception on shutdown
This commit is contained in:
parent
400ee555e7
commit
7ba4d9192d
Binary file not shown.
Binary file not shown.
@ -42,10 +42,11 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
|||||||
|
|
||||||
protected virtual void Dispose(Boolean disposing) {
|
protected virtual void Dispose(Boolean disposing) {
|
||||||
if(!this.disposedValue) {
|
if(!this.disposedValue) {
|
||||||
if(disposing) {
|
if(disposing) {try {
|
||||||
this.client.MqttMsgPublishReceived -= this.Client_MqttMsgPublishReceived;
|
this.client.MqttMsgPublishReceived -= this.Client_MqttMsgPublishReceived;
|
||||||
this.client.Unsubscribe(new String[] { "#" });
|
this.client.Unsubscribe(new String[] { "#" });
|
||||||
this.client.Disconnect();
|
this.client.Disconnect();
|
||||||
|
} catch (Exception) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
this.client = null;
|
this.client = null;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user