lib/bunny/session.rb in bunny-1.2.2 vs lib/bunny/session.rb in bunny-1.3.0

- old
+ new

@@ -705,10 +705,14 @@ def clean_up_and_fail_on_connection_close!(method) @last_connection_error = instantiate_connection_level_exception(method) @continuations.push(method) clean_up_on_shutdown - @origin_thread.terminate_with(@last_connection_error) + if threaded? + @origin_thread.terminate_with(@last_connection_error) + else + raise @last_connection_error + end end def clean_up_on_shutdown begin shut_down_all_consumer_work_pools!