apiotics 0.1.101 → 0.1.102

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: 58892b459a343aeede24a416eca1b11e663913ca
4
- data.tar.gz: eab39b6fdd5d030ce9b8fb84d791ea54f592701d
3
+ metadata.gz: 1841f2525d6e65a624ab64e4691093eeafc93bef
4
+ data.tar.gz: b83cee88a34a3f06c5a2b724f39449b9412b5d61
5
5
  SHA512:
6
- metadata.gz: daf1d03fcd2f26e3c5f7f83c8b64b9ad1e346bb815147139191afa01f2669cd5095510035f04324e04f927c4982ed38a890b98a4245946bde128157a5e332545
7
- data.tar.gz: a679ddece5bc3f8dae4d924098cb1aca6235677ad61c281197b3160a443d047ad6e3b9a6b54cd9d390fc52631ff6ee0500334ce3d5635f44b9fc6924a8676b42
6
+ metadata.gz: 9ae737bc4a7b75f7dcc8e51272a5d908eb43420bf36f47279fb6439249ee904e6dc0fa06e725439c061a8cf1997ea0b59366303acb2079a6060e539acedb4446
7
+ data.tar.gz: 118731ec9155b8e46fcf149b44bb3108652bdbde5ee93dff6473cae0efdf438bb30855377022f7cba06c05b7c70094618340d839cb512aa81ceaafd87dd34981
@@ -118,31 +118,35 @@ module Apiotics
118
118
 
119
119
  def listen_local
120
120
  if Apiotics.configuration.redis_comms_connection == false
121
- server = TCPServer.open(@localport)
122
- loop do
123
- Thread.abort_on_exception = true
124
- Thread.fork(server.accept) do |client|
125
- s = client.gets
126
- if @error_msg != nil
127
- string = '{"error":"' + error_msg + '"}'
128
- client.puts(string)
129
- end
130
- #puts s
131
- self.send(s)
132
- end
133
- end
134
- else
135
- redis = ::Redis.new
136
- redis.subscribe(Apiotics.configuration.public_key) do |on|
137
- on.message do |channel, msg|
138
- if @error_msg != nil
139
- string = '{"error":"' + error_msg + '"}'
140
- client.puts(string)
141
- end
142
- #puts msg
143
- self.send(msg)
121
+ begin
122
+ server = TCPServer.open(@localport)
123
+ loop do
124
+ Thread.abort_on_exception = true
125
+ Thread.fork(server.accept) do |client|
126
+ s = client.gets
127
+ if @error_msg != nil
128
+ string = '{"error":"' + error_msg + '"}'
129
+ client.puts(string)
130
+ end
131
+ #puts s
132
+ self.send(s)
133
+ end
134
+ end
135
+ else
136
+ redis = ::Redis.new
137
+ redis.subscribe(Apiotics.configuration.public_key) do |on|
138
+ on.message do |channel, msg|
139
+ if @error_msg != nil
140
+ string = '{"error":"' + error_msg + '"}'
141
+ client.puts(string)
142
+ end
143
+ #puts msg
144
+ self.send(msg)
145
+ end
144
146
  end
145
147
  end
148
+ rescue
149
+ server.close
146
150
  end
147
151
  end
148
152
 
@@ -1,3 +1,3 @@
1
1
  module Apiotics
2
- VERSION = '0.1.101'
2
+ VERSION = '0.1.102'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiotics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.101
4
+ version: 0.1.102
5
5
  platform: ruby
6
6
  authors:
7
7
  - MicroArx Corporation