pigato 0.2.10 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2f8e5e09928825c08746324ee5260e90715167b
4
- data.tar.gz: 61b75da8503f372ec524fa239f9e5e76e51a0ed9
3
+ metadata.gz: 7bb10f9ed50f4425576fcb1dd7e32d0b2f2c7e45
4
+ data.tar.gz: 61516e01acb8e78ab4d1fe79f4450b1b71ba942a
5
5
  SHA512:
6
- metadata.gz: 85f5110cfe5d818bf04e288c3e5a258a34b30f0d79e08a1036cff070dd80e67fb45cfb5fadaeccb96f1c298f77ee2c8e554694ff0ddfd839bbe629b4366ed3ff
7
- data.tar.gz: c32bfe7b7c01b45e68c58990edcb80a4cade321d63e142f7eb326649d3378fa1e923615999ae529391b1d8a568c687b52e3af14aa80ad0a3a3c3f534b23eda4b
6
+ metadata.gz: f6356f628e5796a3ace76b2ed7242376c4e70f1ff8525550ab3a43c37b3c4360908de9cf1b7476d0f495d7aab21374baddb90f6309cb70a054fa1bad1e976b40
7
+ data.tar.gz: b7a20ce03675ad6c77b6a2794499c2b79d78be38d27a421021b79bb9e4471b8ed94a09033fc29405f50b41e237f01568665f3f6d8996fb98cb229fa24cbfd8b1
data/lib/pigato/client.rb CHANGED
@@ -65,13 +65,16 @@ class Pigato::Client
65
65
  if @socket
66
66
  @socket.close
67
67
  end
68
+ if @ctx
69
+ @ctx.destroy
70
+ end
68
71
  end
69
72
 
70
73
  def reconnect_to_broker
71
74
  stop
72
- @context = ZMQ::Context.new
73
- @socket = @context.socket ZMQ::DEALER
74
- @context.linger = 0
75
+ @ctx = ZMQ::Context.new
76
+ @socket = @ctx.socket ZMQ::DEALER
77
+ @ctx.linger = 0
75
78
  @socket.identity = SecureRandom.uuid
76
79
  @socket.connect @broker
77
80
  end
@@ -1,3 +1,3 @@
1
1
  module Pigato
2
- VERSION = "0.2.10"
2
+ VERSION = "0.2.11"
3
3
  end
data/lib/pigato/worker.rb CHANGED
@@ -79,10 +79,13 @@ class Pigato::Worker
79
79
  if @socket
80
80
  @socket.close
81
81
  end
82
+ if @ctx
83
+ @ctx.destroy
84
+ end
82
85
 
83
- @context = ZMQ::Context.new
84
- @socket = @context.socket ZMQ::DEALER
85
- @context.linger = 0
86
+ @ctx = ZMQ::Context.new
87
+ @socket = @ctx.socket ZMQ::DEALER
88
+ @ctx.linger = 0
86
89
  @socket.identity = SecureRandom.uuid
87
90
  @socket.connect @broker
88
91
  @socket.rcvtimeo = @timeout;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pigato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paolo Ardoino