Permalink
Browse files

Add another check for disconnect errors in the tinytds adapter

  • Loading branch information...
1 parent 6820566 commit b029bf7320bb5cd45140c60744af201202e6d2d1 @jeremyevans committed Apr 1, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sequel/adapters/tinytds.rb
@@ -39,7 +39,7 @@ def execute(sql, opts={})
end
yield(r) if block_given?
rescue TinyTds::Error => e
- raise_error(e, :disconnect=>c.closed?)
+ raise_error(e, :disconnect=>(c.closed? || (c.respond_to?(:dead?) && c.dead?)))
ensure
r.cancel if r && c.sqlsent?
end

0 comments on commit b029bf7

Please sign in to comment.