serverengine 2.0.1 → 2.0.2

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: 9a43da4f1758e3afce58c84f0b4d1afe36af3aba
4
- data.tar.gz: 112970facbae6d06a9a5ca76d8b2f3fbfb492eb9
3
+ metadata.gz: 88edf590d3f97fedd199f51227518ffbd83316fd
4
+ data.tar.gz: 43dba794102f403da6535e19883a7d19034449a2
5
5
  SHA512:
6
- metadata.gz: dd452852d50e00fe0c6bcca020ea861c9a758ec42935318425ee97328ed2bde55470109ef179103751455c4fe8c322c076963e04269ce77245a07c5e9954a97a
7
- data.tar.gz: ff08f2317fdce20b8b617c0c79c39076b4028575417d558638acb0bd31689f19b8fb9215b03bedc6f874cb3038d98f529cf685c696ff5d68b4996c6d2aa6b039
6
+ metadata.gz: e71bfefefd9f62d0ec79b6122bb2308b03b8b8da8cc098993e444b3f27ba5daf23b74460ac219424412368db615b383c0fccd97ca48c9045eb6163996e8b4efd
7
+ data.tar.gz: ff2a3415ecb2d0f6a35f7e940d7bd9e6a1596aaa7a59c0b3954ca85477e0a6f5cc8015fec8366dce85d2212bd7b83df6834af40653c3712bb3fc38d734940f69
data/Changelog CHANGED
@@ -1,3 +1,8 @@
1
+ 2016-11-17 version 2.0.2:
2
+
3
+ * Fix bug to make busy loop on Windows
4
+ * Fix bug to execute unexpected "find" command on Windows
5
+
1
6
  2016-10-18 version 2.0.1:
2
7
 
3
8
  * Fix to set GID before UID, to make it sure to set GID with superuser privilege
@@ -239,34 +239,33 @@ module ServerEngine
239
239
  raise AlreadyClosedError.new
240
240
  end
241
241
 
242
- time ||= Time.now
242
+ if @rpipes.empty?
243
+ sleep blocking_timeout if blocking_timeout > 0
244
+ return nil
245
+ end
243
246
 
244
- unless ServerEngine.windows?
245
- # heartbeat is not supported on Windows platform.
247
+ if ServerEngine.windows?
248
+ raise "heartbeat is not supported on Windows platform. @rpipes must be empty."
249
+ end
246
250
 
247
- if @rpipes.empty?
248
- sleep blocking_timeout if blocking_timeout > 0
249
- return nil
250
- end
251
+ time = Time.now
252
+ ready_pipes, _, _ = IO.select(@rpipes.keys, nil, nil, blocking_timeout)
251
253
 
252
- ready_pipes, _, _ = IO.select(@rpipes.keys, nil, nil, blocking_timeout)
253
-
254
- if ready_pipes
255
- ready_pipes.each do |r|
256
- begin
257
- r.read_nonblock(1024, @read_buffer)
258
- rescue Errno::EAGAIN, Errno::EINTR
259
- next
260
- rescue #EOFError
261
- m = @rpipes.delete(r)
262
- m.start_immediate_stop!
263
- r.close rescue nil
264
- next
265
- end
254
+ if ready_pipes
255
+ ready_pipes.each do |r|
256
+ begin
257
+ r.read_nonblock(1024, @read_buffer)
258
+ rescue Errno::EAGAIN, Errno::EINTR
259
+ next
260
+ rescue #EOFError
261
+ m = @rpipes.delete(r)
262
+ m.start_immediate_stop!
263
+ r.close rescue nil
264
+ next
265
+ end
266
266
 
267
- if m = @rpipes[r]
268
- m.last_heartbeat_time = time
269
- end
267
+ if m = @rpipes[r]
268
+ m.last_heartbeat_time = time
270
269
  end
271
270
  end
272
271
  end
@@ -61,7 +61,7 @@ module ServerEngine
61
61
  def self.generate_path
62
62
  if ServerEngine.windows?
63
63
  for port in 10000..65535
64
- if `netstat -na | find "#{port}"`.length == 0
64
+ if `netstat -na | findstr "#{port}"`.length == 0
65
65
  return port
66
66
  end
67
67
  end
@@ -1,3 +1,3 @@
1
1
  module ServerEngine
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sigdump