lib/bunny/session.rb in bunny-1.3.0 vs lib/bunny/session.rb in bunny-1.3.1
- old
+ new
@@ -706,11 +706,11 @@
@last_connection_error = instantiate_connection_level_exception(method)
@continuations.push(method)
clean_up_on_shutdown
if threaded?
- @origin_thread.terminate_with(@last_connection_error)
+ @origin_thread.raise(@last_connection_error)
else
raise @last_connection_error
end
end
@@ -1036,10 +1036,14 @@
@logger.warn "Caught an exception when cleaning up after receiving connection.close: #{e.message}"
ensure
close_transport
end
- @origin_thread.terminate_with(e)
+ if threaded?
+ @origin_thread.raise(e)
+ else
+ raise e
+ end
else
raise "could not open connection: server did not respond with connection.open-ok but #{connection_open_ok.inspect} instead"
end
end
end