paho-mqtt 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paho-mqtt.rb +3 -0
- data/lib/paho_mqtt/handler.rb +1 -1
- data/lib/paho_mqtt/sender.rb +3 -3
- data/lib/paho_mqtt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed14883e1ebd2e1498ad540c517a808d8d6c8b51
|
4
|
+
data.tar.gz: 38d3f1223a5f677ea75acdba57969091a68918c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efd6ae4e713a3ab0fde5acbf7040028efafdd9bbccdfa2cfc66401ac2d1e636969760cbf9a5f4b0b469c389813617ddc11a1fa08a5684152130effaf227b2685
|
7
|
+
data.tar.gz: '08900c8d295b3419238b8950959e34e22be9ad344e44cc8f1b95630d490812ff116a00f3160f670b9148d7715f2309e86778307e358ee658d7f75503e8e0f2a0'
|
data/lib/paho-mqtt.rb
CHANGED
data/lib/paho_mqtt/handler.rb
CHANGED
@@ -174,7 +174,7 @@ module PahoMqtt
|
|
174
174
|
end
|
175
175
|
|
176
176
|
def handle_connack_error(return_code)
|
177
|
-
if return_code ==
|
177
|
+
if return_code == 0x01
|
178
178
|
raise LowVersionException
|
179
179
|
elsif CONNACK_ERROR_MESSAGE.has_key(return_code.to_sym)
|
180
180
|
PahoMqtt.logger.warm(CONNACK_ERRO_MESSAGE[return_code])
|
data/lib/paho_mqtt/sender.rb
CHANGED
@@ -16,7 +16,7 @@ module PahoMqtt
|
|
16
16
|
class Sender
|
17
17
|
|
18
18
|
attr_accessor :last_ping_req
|
19
|
-
|
19
|
+
|
20
20
|
def initialize(ack_timeout)
|
21
21
|
@socket = nil
|
22
22
|
@writing_queue = []
|
@@ -46,8 +46,8 @@ module PahoMqtt
|
|
46
46
|
MQTT_ERR_SUCCESS
|
47
47
|
end
|
48
48
|
|
49
|
-
@writing_mutex.synchronize {
|
50
49
|
def writing_loop(max_packet)
|
50
|
+
@writing_mutex.synchronize {
|
51
51
|
cnt = 0
|
52
52
|
while !@writing_queue.empty? && cnt < max_packet do
|
53
53
|
packet = @writing_queue.shift
|
@@ -57,7 +57,7 @@ module PahoMqtt
|
|
57
57
|
}
|
58
58
|
MQTT_ERR_SUCCESS
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
def flush_waiting_packet(sending=true)
|
62
62
|
if sending
|
63
63
|
@writing_mutex.synchronize {
|
data/lib/paho_mqtt/version.rb
CHANGED