mysql-native v2.1.0

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Thu Mar 8 07:03:15 UTC 2018


On 03/07/2018 04:53 PM, bauss wrote:
> 
> I can't seem to reproduce it now, but I'll keep an eye for it and see if 
> it still happens, but I think the problem is when you return the 
> connection from a function.
> 
> I had similar issues returning a raw connection created.

By any chance, are you ever storing a Connection or a ResultRange 
anywhere? I don't mean as a function-local variable or a a function 
parameter: I mean like as a class/struct member or as a global? (Well, 
not that D really has true globals, but a "global" at the module-level.)

If you keep around a Connection (or a ResultRange, which has a reference 
to its own Connection) past the end of the vibe.d task that was using 
it, then that can definitely cause this kind of problem.

(AIUI, vibe.d wants to make the connections you obtain from a pool be 
Scoped. That would help prevent users from accidentally storing 
something they shouldn't and running into this issue.)


More information about the Digitalmars-d-announce mailing list