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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81783208a50d429eede136e757bddf982ed2fd83
4
- data.tar.gz: 4d1c34982623e35713e8af79da00cc6bf14d91eb
3
+ metadata.gz: ed14883e1ebd2e1498ad540c517a808d8d6c8b51
4
+ data.tar.gz: 38d3f1223a5f677ea75acdba57969091a68918c5
5
5
  SHA512:
6
- metadata.gz: 02f36654df8e3f0ae3a3e47f64708ca0f770076766c7e593755d8d55dc14950e40b1eab91631f4aab7815e83653f83e2ca05dd02f8565820a3d2b089a2652cee
7
- data.tar.gz: 50456a5604f7318622cd1809b8859db2845c7c5a0b7b4bae15d09333d957248c40cced139c7c54ac6efff9efda6985aad4c84b50de33880491ad4a369a247ff4
6
+ metadata.gz: efd6ae4e713a3ab0fde5acbf7040028efafdd9bbccdfa2cfc66401ac2d1e636969760cbf9a5f4b0b469c389813617ddc11a1fa08a5684152130effaf227b2685
7
+ data.tar.gz: '08900c8d295b3419238b8950959e34e22be9ad344e44cc8f1b95630d490812ff116a00f3160f670b9148d7715f2309e86778307e358ee658d7f75503e8e0f2a0'
@@ -131,4 +131,7 @@ module PahoMqtt
131
131
 
132
132
  class PacketException < PahoMqtt::Exception
133
133
  end
134
+
135
+ class LowVersionException < PahoMqtt::Exception
136
+ end
134
137
  end
@@ -174,7 +174,7 @@ module PahoMqtt
174
174
  end
175
175
 
176
176
  def handle_connack_error(return_code)
177
- if return_code == 0x01
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])
@@ -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 {
@@ -1,3 +1,3 @@
1
1
  module PahoMqtt
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paho-mqtt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Goudet