stf-client 0.2.4 → 0.2.5

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: fe10fd42d526e06d9581d7794922e2764c0a05d2
4
- data.tar.gz: f4e9bcb66e92f0837939e479618e984e06bf8ff2
3
+ metadata.gz: e611575d710151bc5174f3becf20249a17620de6
4
+ data.tar.gz: 2fca333c0cc0e4a27b1b417a4c38d6285b49f065
5
5
  SHA512:
6
- metadata.gz: a26f7c012f8549699343264a394408b08f2bf5b95e0e711f65cc11cebdc9fb6574627719a045123b74a28b715f280d31825af02db469881b1b2e6c323554e600
7
- data.tar.gz: 8f252be27e006a2f1fa35ac90fcde4cf608e7ef194fe5953c98aa8e27fc20e8936f77e538d8a3f7dc8eb19ff3a42dd3ea9edb285005cc62ed1d5c83736cdfee6
6
+ metadata.gz: 6912657d0b053de969a660f86ce9837eec43731c242b758391d3ec144a32cd3b30e2646bde74351c76ae193c4418e01f86876105aee755b91bb56539676f9eeb
7
+ data.tar.gz: 50464617b8c5849893929fa976c50f37bac995e6ee4d457caff945b49a145f8581eedbbd04a752538702e7a46968cea376b6cd525eb8c53b36aae77320590a03
@@ -32,20 +32,17 @@ module Stf
32
32
 
33
33
  begin
34
34
  connect_loop(all_flag, wanted, filter, false, 5, start_timeout)
35
-
36
35
  rescue SignalException => e
36
+ logger.info "Caught signal #{e}"
37
37
  DI[:stop_all_debug_sessions_interactor].execute
38
38
  return false
39
-
40
39
  rescue
41
- end
42
-
43
- connected_count = count_connected_devices(filter)
44
- if all_flag ? connected_count.zero? : connected_count < wanted
40
+ logger.info "Exception #{e} during initial connect loop"
45
41
  DI[:stop_all_debug_sessions_interactor].execute
46
42
  return false
47
43
  end
48
44
 
45
+ connected_count = count_connected_devices(filter)
49
46
  logger.info "Lower quantity achieved, already connected #{connected_count}"
50
47
 
51
48
  return true if nodaemon_flag
@@ -69,7 +66,7 @@ module Stf
69
66
  def connect_loop(all_flag, wanted, filter, infinite_flag, delay, timeout, forever_flag = false)
70
67
  finish_time = Time.now + timeout
71
68
 
72
- while forever_flag || Time.now < finish_time do
69
+ while true do
73
70
  cleanup_disconnected_devices(filter)
74
71
 
75
72
  stf_devices = DeviceList.new(DI[:stf].get_devices)
@@ -90,6 +87,10 @@ module Stf
90
87
  end
91
88
 
92
89
  sleep delay
90
+
91
+ if !forever_flag || Time.now > finish_time
92
+ raise "Connect loop timeout reached"
93
+ end
93
94
  end
94
95
 
95
96
  end
data/lib/stf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Stf
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stf-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Malinskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-20 00:00:00.000000000 Z
11
+ date: 2018-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli