On Monday, March 23, 2015 at 3:32:59 PM UTC-7, Justin Erny wrote:
>
> Hello,
>
> I am seeing an issue in the TinyTDS adapter. I am seen an
> error TinyTds::Error: DBPROCESS is dead or not enabled be called at this
> line when calling r.cancel
>
>
> https://github.com/jeremyevans/sequel/blob/master/lib/sequel/adapters/tinytds.rb#L67
>
> Because of this the error thrown is TinyTds::Error instead of
> a Sequel::DatabaseDisconnectError so the connection never gets cleaned up
> in the connection pool.
>
> I am only seeing this on a centos 6 vm. Just wanted to see if this is
> expected or considered a bug.
>
Can you try this patch and let me know if it fixes the issue:
diff --git a/lib/sequel/adapters/tinytds.rb b/lib/sequel/adapters/tinytds.rb
index 5e2053b..ca944e0 100644
--- a/lib/sequel/adapters/tinytds.rb
+++ b/lib/sequel/adapters/tinytds.rb
@@ -64,7 +64,7 @@ module Sequel
rescue TinyTds::Error => e
raise_error(e, :disconnect=>!c.active?)
ensure
- r.cancel if r && c.sqlsent?
+ r.cancel if r && c.sqlsent? && c.active?
end
end
end
If that doesn't fix the issue, can you post a self contained example
showing the issue?
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.