tdlib-ruby 0.9.0 → 0.9.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c84fd6d3b63901223ca8b58a9bea70c0fb2cae9b
4
- data.tar.gz: 154ea127f32e385caba187f87c23a117e98950b4
3
+ metadata.gz: d9a09d6aacb86936097c8e639dea0ac3930cd4f8
4
+ data.tar.gz: f5b25381a3aee0a60d45042115d943ac20b9242b
5
5
  SHA512:
6
- metadata.gz: fe38b4ed8eca764247be42b4dc66d45c7880ea15bdcba516923aa1668441b89f50c85ec46bcb6c085aa0a016618c44312c06f95b4f988bddbeb9335a751f4c34
7
- data.tar.gz: 50c96aabe2d58139604c1f3590da3d8ac80723622cac02cfc64daa23f8af6d924da0be44a5e072dbd310f781ba1a6144332496d7984ff21959411271eced8db0
6
+ metadata.gz: ef289a28405f4267953819f2f626ece72ad5abf18b77ec989b5756197fd0e3715c44a00d4476c8603597d352ac9b0dc21302ebbffce8083e24ce78736a501865
7
+ data.tar.gz: 7efb461c9258ce835a36f611c274155825d6492d93d7d6cff7d9a25399656091dc0bf2e1aaf3b4bc2f52363fd96f8f1dffd2be1a8a0ec82b876451b3578564f5
@@ -1,4 +1,9 @@
1
- ### 0.9.0 / 2018-04-25
1
+ ### 0.9.1 / 2018-04-27
2
+
3
+ * Fix deadlock in Client#on_ready
4
+
5
+ ### 0.9.0 / 2018-04-26
6
+
2
7
  * Use Celluloid
3
8
 
4
9
  ### 0.8.0 / 2018-04-25
@@ -66,7 +66,7 @@ class TD::Client
66
66
  @td_client = td_client
67
67
  @update_manager = update_manager
68
68
  @config = TD.config.client.to_h.merge(extra_config)
69
- @ready = Celluloid::Condition.new
69
+ @ready_condition = Celluloid::Condition.new
70
70
  authorize
71
71
  @update_manager.run
72
72
  end
@@ -128,8 +128,7 @@ class TD::Client
128
128
  end
129
129
 
130
130
  def on_ready(timeout: TIMEOUT, &_)
131
- @ready.wait(timeout)
132
- yield self
131
+ yield self if @ready || @ready_condition.wait(timeout)
133
132
  rescue Celluloid::ConditionError
134
133
  raise TD::TimeoutError
135
134
  end
@@ -164,7 +163,8 @@ class TD::Client
164
163
  broadcast(encryption_key_query)
165
164
  else
166
165
  @update_manager.remove_handler(handler)
167
- @ready.signal(true)
166
+ @ready = true
167
+ @ready_condition.signal(true)
168
168
  end
169
169
  end
170
170
  @update_manager.add_handler(handler)
@@ -1,4 +1,4 @@
1
1
  module TD
2
2
  # tdlib-ruby version
3
- VERSION = "0.9.0"
3
+ VERSION = "0.9.1"
4
4
  end
@@ -43,7 +43,7 @@ describe TD::Client do
43
43
  end
44
44
 
45
45
  describe '#broadcast_and_receive' do
46
- subject { client.on_ready { client.broadcast_and_receive(payload ) } }
46
+ subject { client.on_ready { client.broadcast_and_receive(payload) } }
47
47
 
48
48
  it { is_expected.to include('@type', 'entities') }
49
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdlib-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Southbridge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-26 00:00:00.000000000 Z
11
+ date: 2018-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-configurable