sappho-heatmiser-proxy 0.1.4 → 0.1.5
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.
|
@@ -20,11 +20,12 @@ module Sappho
|
|
|
20
20
|
Sappho::ApplicationAutoFlushLog.instance.info "#{NAME} version #{VERSION} - #{HOMEPAGE}"
|
|
21
21
|
port = SystemConfiguration.instance.heatmiserPort
|
|
22
22
|
maxClients = SystemConfiguration.instance.maxClients
|
|
23
|
-
Sappho::Socket::SafeServer.new('heatmiser proxy', port, maxClients)
|
|
23
|
+
server = Sappho::Socket::SafeServer.new('heatmiser proxy', port, maxClients)
|
|
24
|
+
server.serve do
|
|
24
25
|
| socket, ip | HeatmiserClient.new(socket, ip).communicate
|
|
25
26
|
end
|
|
26
27
|
Thread.new do
|
|
27
|
-
Heatmiser.new.monitor
|
|
28
|
+
Heatmiser.new.monitor { server.clientCount > 0 }
|
|
28
29
|
end.join
|
|
29
30
|
end
|
|
30
31
|
|
|
@@ -49,7 +49,7 @@ module Sappho
|
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
unless command
|
|
52
|
-
command = queryCommand if (Time.now - timestamp) >= config.sampleDelay
|
|
52
|
+
command = queryCommand if (Time.now - timestamp) >= config.sampleDelay or yield
|
|
53
53
|
end
|
|
54
54
|
if command
|
|
55
55
|
log.debug "sending command: #{hexString command}" if log.debug?
|
|
@@ -81,7 +81,7 @@ module Sappho
|
|
|
81
81
|
status.invalidate
|
|
82
82
|
log.error error
|
|
83
83
|
end
|
|
84
|
-
socket.settle
|
|
84
|
+
socket.settle 1
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
87
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sappho-heatmiser-proxy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 17
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 5
|
|
10
|
+
version: 0.1.5
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Andrew Heald
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2012-
|
|
18
|
+
date: 2012-04-20 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: rake
|
|
@@ -42,12 +42,12 @@ dependencies:
|
|
|
42
42
|
requirements:
|
|
43
43
|
- - ">="
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
|
-
hash:
|
|
45
|
+
hash: 29
|
|
46
46
|
segments:
|
|
47
47
|
- 0
|
|
48
48
|
- 1
|
|
49
|
-
-
|
|
50
|
-
version: 0.1.
|
|
49
|
+
- 3
|
|
50
|
+
version: 0.1.3
|
|
51
51
|
type: :runtime
|
|
52
52
|
version_requirements: *id002
|
|
53
53
|
description: See the project home page for more information
|