dns_one 0.4.62 → 0.4.63

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: 3d64325aad5a5ce2db92f160e3df2eec3659dab4
4
- data.tar.gz: f29882f14990a5c71662f5af76291f9c1b8ad63b
3
+ metadata.gz: fa014ca733029ef9e49e71451ac93b0d8a235155
4
+ data.tar.gz: a9b8a83b5e734f9a9a45735d3fe3ae14fa344962
5
5
  SHA512:
6
- metadata.gz: ca4a3f8e9df8e8c35cea1386f35245b04fc977d346a918a79d361883e0228239421928cb2f5a249c49419942f7f29fd9ed9153c8896fcdd48026a61fc8f1291f
7
- data.tar.gz: ee750abaf39336b7dd927c533a9d00ca8d60392b4d8687a2fe250770fa1be738559275c4b4ad49dd12f096e61b6a0a76bd060f391cec63d27a0e647cb6139fcc
6
+ metadata.gz: 7e6903cb7326a654bf59f056309f18ca55b070ba942549ac3efb200f36f0a4c94dde0a16d297f01c7b2d1fc1cf06ed3d1492b7d8d3d06bc3188fb909166c748b
7
+ data.tar.gz: 4efd70b798c88adb71f37e55050fdeb7fe1c92030cd27046aa18b7359627d92b8242e7bcde3078e396a5aa5a8c2a95ec519194355f11c304a0647e46ead9214e
@@ -1,5 +1,7 @@
1
1
 
2
2
  require "dns_one/zone_search"
3
+ require 'socket'
4
+ require 'json'
3
5
 
4
6
  module DnsOne; class Server
5
7
 
@@ -125,28 +127,31 @@ module DnsOne; class Server
125
127
  def launch_log_result_socket
126
128
  log_result = @log_result
127
129
  log_result_mutex = @log_result_mutex
130
+ conf = @conf
128
131
  sock = Thread.new do
129
- Socket.unix_server_loop(conf[:log_result_socket_file] || DEFAULT_LOG_RESULT_SOCKET_FILE) do |sock, addr|
130
- Log.i "opened unix socket #{sock}"
131
- Thread.new do
132
- loop do
133
- begin
134
- log_result_mutex.synchronize {
135
- sock.write "#{ log_result.to_json }\n"
136
- }
137
- rescue Errno::EPIPE => e
138
- break
139
- rescue => e
140
- Log.exc e
141
- break
132
+ begin
133
+ Socket.unix_server_loop(conf[:log_result_socket_file] || DEFAULT_LOG_RESULT_SOCKET_FILE) do |sock, addr|
134
+ Thread.new do
135
+ loop do
136
+ begin
137
+ log_result_mutex.synchronize {
138
+ sock.write "#{ log_result.to_json }\n"
139
+ }
140
+ rescue Errno::EPIPE => e
141
+ break
142
+ rescue => e
143
+ Log.exc e
144
+ break
145
+ end
146
+ Thread.pass
147
+ sleep 0.1
142
148
  end
143
- Thread.pass
144
- sleep 0.1
145
149
  end
146
150
  end
151
+ rescue => e
152
+ Log.exc e
147
153
  end
148
154
  end
149
155
  end
150
156
 
151
157
  end; end
152
-
@@ -1,3 +1,3 @@
1
1
  module DnsOne
2
- VERSION = "0.4.62"
2
+ VERSION = "0.4.63"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dns_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.62
4
+ version: 0.4.63
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lobato