Skip to content

Commit fc70aeb

Browse files
Merge pull request #53 from southbridgeio/develop
Develop
2 parents ef3fc49 + 2cb8b19 commit fc70aeb

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 3.0.2 / 2020-06-29
2+
3+
* Rescue exceptions in update manager thread
4+
15
### 3.0.1 / 2020-06-29
26

37
* Fix client dispose

lib/tdlib/update_manager.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def add_handler(handler)
1515

1616
def run(callback: nil)
1717
Thread.start do
18-
catch(:client_closed) { loop { handle_update(callback: callback) } }
18+
catch(:client_closed) { loop { handle_update(callback: callback); sleep 0.001 } }
1919
@mutex.synchronize { @handlers = [] }
2020
end
2121
end
@@ -34,6 +34,8 @@ def handle_update(callback: nil)
3434

3535
match_handlers!(update, extra).each { |h| h.async.run(update) }
3636
end
37+
rescue StandardError => e
38+
warn("Uncaught exception in update manager: #{e.message}")
3739
end
3840

3941
def match_handlers!(update, extra)

lib/tdlib/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module TD
22
# tdlib-ruby version
3-
VERSION = "3.0.1"
3+
VERSION = "3.0.2"
44
end

0 commit comments

Comments
 (0)