Skip to content
This repository was archived by the owner on Mar 8, 2025. It is now read-only.

Commit 4859555

Browse files
committed
fix (Connection): better wrap exceptions
This fixes CI builds
1 parent 82d61ad commit 4859555

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/tarantool/connection.cr

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ module Tarantool
8888
@encoded_salt = @socket.gets.not_nil![0...44]
8989

9090
spawn do
91-
routine
92-
rescue ex : Exception
93-
# It's wrapped in spawn because there is no guarantee
94-
# that anyone would read from the @error_channel
95-
spawn do
96-
@error_channel.send(ex)
91+
begin
92+
routine
93+
rescue ex : Exception
94+
# It's wrapped in spawn because there is no guarantee
95+
# that anyone would read from the @error_channel
96+
spawn do
97+
@error_channel.send(ex)
98+
end
9799
end
98100
ensure
99101
@open = false

0 commit comments

Comments
 (0)