Skip to content

Commit

Permalink
Remove unread variable
Browse files Browse the repository at this point in the history
  • Loading branch information
felixLam committed May 23, 2016
1 parent c49bbd4 commit 4077a6d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions MQTTClient/MQTTClient/MQTTSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,6 @@ - (void)handlePublish:(MQTTMessage*)msg {
NSRange range = NSMakeRange(2 + topicLength, [data length] - topicLength - 2);
data = [data subdataWithRange:range];
if ([msg qos] == 0) {
BOOL processed = true;
if ([self.delegate respondsToSelector:@selector(newMessage:data:onTopic:qos:retained:mid:)]) {
[self.delegate newMessage:self
data:data
Expand All @@ -706,12 +705,12 @@ - (void)handlePublish:(MQTTMessage*)msg {
mid:0];
}
if ([self.delegate respondsToSelector:@selector(newMessageWithFeedback:data:onTopic:qos:retained:mid:)]) {
processed = [self.delegate newMessageWithFeedback:self
data:data
onTopic:topic
qos:msg.qos
retained:msg.retainFlag
mid:0];
[self.delegate newMessageWithFeedback:self
data:data
onTopic:topic
qos:msg.qos
retained:msg.retainFlag
mid:0];
}
if (self.messageHandler) {
self.messageHandler(data, topic);
Expand Down

0 comments on commit 4077a6d

Please sign in to comment.