em-zmq-tp10 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,12 +124,17 @@ module EM
124
124
  @connections.clear
125
125
  @conn_addresses.clear
126
126
  @reconnect_timers.each{|_, timer| EM.cancel_timer(timer)}
127
+ cb ||= block
127
128
  unless @peers.empty?
128
- @after_writting = cb || block
129
- flush_all_queue if @after_writting
130
- @peers.values.each{|c| c.close_connection(!!@after_writting)}
129
+ if cb
130
+ @after_writting = cb
131
+ flush_all_queue
132
+ @peers.values.each{|c| c.close_connection(true)}
133
+ else
134
+ @peers.values.each{|c| c.close_connection}
135
+ end
131
136
  else
132
- EM.next_tick @after_writting
137
+ EM.next_tick(cb) if cb
133
138
  end
134
139
  @bindings.each{|c|
135
140
  unless String === c
@@ -1,7 +1,7 @@
1
1
  module EventMachine
2
2
  module Protocols
3
3
  module Zmq2
4
- VERSION = '0.1.11'
4
+ VERSION = '0.1.12'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: em-zmq-tp10
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.11
5
+ version: 0.1.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sokolov Yura 'funny-falcon'
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-05 00:00:00.000000000 Z
12
+ date: 2012-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  type: :runtime