ruby_rabbitmq_janus 2.2.0.pre.164 → 2.2.0.pre.165

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: 96c8fbfa42ec3311a8128965e4bd53a55a7df0a8
4
- data.tar.gz: 9f891c23002f7a8911a7921c5e0bc73fae3e7629
3
+ metadata.gz: 9f43c6e9fa9e697cdaabc4c6e1de25f3d0a1a4f7
4
+ data.tar.gz: 3becca8885172f35e336b452d8785448c3170dcd
5
5
  SHA512:
6
- metadata.gz: fa157e373a5caacaadba89f783d490aad03d789526fdfc9efd63e27b2eee576cd73d0010af1edd89ba573b1c5e3aacab12910d70366033e4b35ab6305a2b28ee
7
- data.tar.gz: 898f711848c38e3a258251db1164737c109322f01938ea3225afaf4e1ca8a1ce041156d7f468317506dce3a037101a7e9adf4a309aa97815b08fb4a9c119345a
6
+ metadata.gz: c7a29c8e485bac6623592ca9440bb8ce6e7fa317a550e03ae568b851c880cf0a8142ab0fed1d947eff9ac1d64fd9edd094509e4cad206e56ce37574b61d1dc7b
7
+ data.tar.gz: 78c84a58b89e44393d122d90874f869ad5e73983ac8a97b3c57c807dfadab7e00b9dfd56218aab013bc5c335ef3eefce36ef01e61297c66909033fcf369a52b6
@@ -24,10 +24,18 @@ module RubyRabbitmqJanus
24
24
  @session = response_session
25
25
  end
26
26
 
27
+ # Restart session
28
+ def restart_session
29
+ puts 'Restart session ...'
30
+ @session = response_session
31
+ end
32
+
33
+ # Start a timer for TTL
27
34
  def start
28
35
  @timer.loop_keepalive { response_keepalive }
29
36
  end
30
37
 
38
+ # Kill session and disable instance
31
39
  def kill
32
40
  response_destroy
33
41
  super
@@ -52,7 +52,7 @@ module RubyRabbitmqJanus
52
52
 
53
53
  def prepare_loop(&block)
54
54
  Timeout.timeout(@time_publish) do
55
- yield
55
+ block.binding.receiver.restart_session if yield
56
56
  end
57
57
  rescue Timeout::Error
58
58
  stop_timer
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_rabbitmq_janus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0.pre.164
4
+ version: 2.2.0.pre.165
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-28 00:00:00.000000000 Z
11
+ date: 2017-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler