novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 463 forks source link

sessionPresent parameter in MQTTConnectHandler? #546

Open ackratos opened 4 years ago

ackratos commented 4 years ago

The comment says MQTTConnectHandler has a parameter sessionPresent

https://github.com/novastone-media/MQTT-Client-Framework/blob/7c5e329f5a916595d3064e2e0aea7b3597d4a4a8/MQTTClient/MQTTClient/MQTTSession.h#L498-L525

But the definition of MQTTConnectHandler doesn't have that parameter. Is the comment out-of-date? https://github.com/novastone-media/MQTT-Client-Framework/blob/7c5e329f5a916595d3064e2e0aea7b3597d4a4a8/MQTTClient/MQTTClient/MQTTSession.h#L274

ckrey commented 4 years ago

Yes, the comment is out-of-date:

should read:

[session connectWithConnectHandler:^(NSError *error) { 
  if (error) { 
      NSLog(@"Error Connect %@", error.localizedDescription); 
  } else { 
      NSLog(@"Connected sessionPresent:%d", self.sessionPresent); 
  } 
  }];