serverengine 2.0.1-x64-mingw32 → 2.0.2-x64-mingw32

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: cf4b124ad3521434ed25e86c8954a5a5b5381397
4
- data.tar.gz: f32d19141aadf8a533d77eeccf2ae4001aed78e2
3
+ metadata.gz: ecb81bf960bfaf3ef9f3b9ef8cd6ca77835bb473
4
+ data.tar.gz: 84c3d6e12eb76f81a1768daafb5e78c9b355857d
5
5
  SHA512:
6
- metadata.gz: a57e06848c5eac9e410e7f6e78bc6bf2bd61ce7a95df1e825a0185360b3e64523ef8a76655e9e787fe0a19eec7f50a01d68240591d6009a0731116364bc07da8
7
- data.tar.gz: 1a01938dac11d1e9edf66e31c29f7ff11d1b88bf8bfa198dc29ada81c745371023d3efeaddd44e674b5e0d9eb738fd518f6a36cb60c73e0c7fbc039a9192634b
6
+ metadata.gz: 5a9dde3a277416f1665b8559300ea7248ff6a8fc3b611505fc7febae2462df00a240eb4c124290cd7fe7c0c962431f566c4022590634615ffd5f11aac424fd44
7
+ data.tar.gz: 2479f98f06b7298cafc88b66f7c03829f07469f5bf8c02b5816c98aee9ec3be1df7950c3dfe8341bb08c10bc21be96a53fc671ec22861bec1faccc0dcd8222b0
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: x64-mingw32
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