make mirror on github.com
also remove a disconnet on the first start
This commit is contained in:
parent
51bfd52095
commit
9a94ff97d2
@ -12,6 +12,7 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
||||
private MqttClient client;
|
||||
private Thread connectionWatcher;
|
||||
private Boolean connectionWatcherRunning;
|
||||
private Boolean firstStart = true;
|
||||
|
||||
public Mqtt(Dictionary<String, String> settings) : base(settings) {
|
||||
Console.WriteLine("BlubbFish.Utils.IoT.Connector.Data.Mqtt(" + this.ToString()+")");
|
||||
@ -62,10 +63,14 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
||||
}
|
||||
|
||||
private void Reconnect() {
|
||||
if(this.IsConnected) {
|
||||
this.Disconnect(true);
|
||||
if(!this.firstStart) {
|
||||
if(this.IsConnected) {
|
||||
this.Disconnect(true);
|
||||
} else {
|
||||
this.Disconnect(false);
|
||||
}
|
||||
} else {
|
||||
this.Disconnect(false);
|
||||
this.firstStart = false;
|
||||
}
|
||||
this.Connect();
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
# BlubbFish.Utils.IoT.Connector.Data.Mqtt (ConnectorDataMqtt)
|
||||
Library that connects to Mqtt using M2Mqtt
|
||||
|
||||
Maybe you find this Repo on Github. This is a mirror from [here](https://git.blubbfish.net/vs_utils/ConnectorDataMqtt).
|
||||
|
||||
## Linking to
|
||||
### Internal
|
||||
* BlubbFish.Utils.IoT ([Utils-IoT](http://git.blubbfish.net/vs_utils/Utils-IoT))
|
||||
|
||||
### External
|
||||
* M2Mqtt
|
||||
* M2Mqtt ([Used Fork](https://github.com/blubbfish/mqtt), [Original](https://github.com/eclipse/paho.mqtt.m2mqtt))
|
Loading…
Reference in New Issue
Block a user