protobuf 3.3.5 → 3.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/protobuf/cli.rb CHANGED
@@ -219,7 +219,6 @@ module Protobuf
219
219
  logger.info { 'RPC Server shutting down...' }
220
220
  @runner.try(:stop)
221
221
  ::Protobuf::Rpc::ServiceDirectory.instance.stop
222
- logger.info { 'Shutdown complete' }
223
222
  end
224
223
 
225
224
  # Start the runner and log the relevant options.
@@ -233,6 +232,10 @@ module Protobuf
233
232
 
234
233
  ::ActiveSupport::Notifications.instrument("after_server_bind")
235
234
  end
235
+
236
+ logger.info { 'Shutdown complete' }
237
+
238
+ exit 0
236
239
  end
237
240
  end
238
241
  end
@@ -29,7 +29,7 @@ module Protobuf
29
29
  rc = @poller.poll(500)
30
30
 
31
31
  # The server was shutdown and no requests are pending
32
- break if rc == 0 && !running?
32
+ break if rc == 0 && !running? && @server.workers.empty?
33
33
  # Something went wrong
34
34
  break if rc == -1
35
35
 
@@ -42,7 +42,7 @@ module Protobuf
42
42
  end
43
43
 
44
44
  def running?
45
- @server.running? || @server.workers.any?
45
+ @server.running?
46
46
  end
47
47
 
48
48
  private
@@ -113,7 +113,7 @@ module Protobuf
113
113
  end
114
114
 
115
115
  def local_queue_available?
116
- local_queue.size < local_queue_max_size
116
+ local_queue.size < local_queue_max_size && running?
117
117
  end
118
118
 
119
119
  def local_queue_max_size
@@ -1,3 +1,3 @@
1
1
  module Protobuf
2
- VERSION = '3.3.5'
2
+ VERSION = '3.3.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.5
4
+ version: 3.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-09-16 00:00:00.000000000 Z
15
+ date: 2014-10-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
@@ -407,7 +407,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
407
407
  version: '0'
408
408
  segments:
409
409
  - 0
410
- hash: -3081500598642706001
410
+ hash: 2790172649663274140
411
411
  required_rubygems_version: !ruby/object:Gem::Requirement
412
412
  none: false
413
413
  requirements:
@@ -416,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
416
416
  version: '0'
417
417
  segments:
418
418
  - 0
419
- hash: -3081500598642706001
419
+ hash: 2790172649663274140
420
420
  requirements: []
421
421
  rubyforge_project:
422
422
  rubygems_version: 1.8.24