mqtt-ccutrer 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: fbcc93715636fd1a6f3491005dccf8c9805c519145145154a9895d5fb3df0670
4
- data.tar.gz: f978d8185287327b475f69881546dde182fbbd3c9d665253d9625bc48df1f9a9
3
+ metadata.gz: 6edb25957b0e8c0253a47920bea2c49b7062f890364bdb7b85831715d2780fb2
4
+ data.tar.gz: 8de9202fe28cbcff6b2f95c7fad8e9d87e693713115fff6237d69213021f3a84
5
5
  SHA512:
6
- metadata.gz: 53cb56f81cd0eed1d41d6a0c5a7b7fcb88e53f5fcea755cdf544715d38fd698b931c7b5d23bbf161709a0f46fe72ce14a0f0107f2bfe5f59e92225c72d8d0556
7
- data.tar.gz: 845ec674c88c7be5b7835adeb1d6b52397661f3e02ae775240cb2621058eba72956327ca961c0ce82172a13485faee720d9b0c9c37e99f03643f1918d5d0d203
6
+ metadata.gz: b9d3a01a30f91600f5e5005d1b13c240b4e0b6cb250d3c14f258fd86911cd80b443b9e3b34a1ef6b3c0170746d0b08128559f518aeb8f868218ac08c115fd58c
7
+ data.tar.gz: 4b4065cedf0deda00ef06d207a7c25f8fb3c968c9ce81558229b469c19349c93fb650d9ca09a7261dbadc99dc802cdab194de49f608589dd9feb37d17fa46c91
data/lib/mqtt/client.rb CHANGED
@@ -661,9 +661,9 @@ module MQTT
661
661
 
662
662
  def handle_timeouts
663
663
  @acks_mutex.synchronize do
664
- current_time = self.current_time
664
+ current_time_local = current_time
665
665
  @acks.each_value do |pending_ack|
666
- break unless pending_ack.timeout_at <= current_time
666
+ break unless pending_ack.timeout_at <= current_time_local
667
667
 
668
668
  resend(pending_ack)
669
669
  end
@@ -696,19 +696,19 @@ module MQTT
696
696
 
697
697
  next_ping = @last_packet_received_at + @keep_alive if @keep_alive && !@keep_alive_sent
698
698
  next_ping = @last_packet_received_at + @keep_alive + @ack_timeout if @keep_alive && @keep_alive_sent
699
- current_time = self.current_time
700
- [([timeout_from_acks, next_ping].compact.min || current_time) - current_time, 0].max
699
+ current_time_local = current_time
700
+ [([timeout_from_acks, next_ping].compact.min || current_time_local) - current_time_local, 0].max
701
701
  end
702
702
 
703
703
  def handle_keep_alives
704
704
  return unless @keep_alive && @keep_alive > 0
705
705
 
706
- current_time = self.current_time
707
- if current_time >= @last_packet_received_at + @keep_alive && !@keep_alive_sent
706
+ current_time_local = current_time
707
+ if current_time_local >= @last_packet_received_at + @keep_alive && !@keep_alive_sent
708
708
  packet = MQTT::Packet::Pingreq.new
709
709
  send_packet(packet)
710
710
  @keep_alive_sent = true
711
- elsif current_time >= @last_packet_received_at + @keep_alive + @ack_timeout
711
+ elsif current_time_local >= @last_packet_received_at + @keep_alive + @ack_timeout
712
712
  raise KeepAliveTimeout
713
713
  end
714
714
  end
data/lib/mqtt/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module MQTT
4
4
  # The version number of the MQTT gem
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mqtt-ccutrer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-20 00:00:00.000000000 Z
11
+ date: 2021-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -159,7 +159,7 @@ homepage: http://github.com/ccutrer/ruby-mqtt
159
159
  licenses:
160
160
  - MIT
161
161
  metadata: {}
162
- post_install_message:
162
+ post_install_message:
163
163
  rdoc_options: []
164
164
  require_paths:
165
165
  - lib
@@ -174,8 +174,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
- rubygems_version: 3.1.4
178
- signing_key:
177
+ rubygems_version: 3.1.2
178
+ signing_key:
179
179
  specification_version: 4
180
180
  summary: Implementation of the MQTT protocol
181
181
  test_files: