Moves from an async worker (bad abstraction) to a connection pool.
bb8does not have an obvious way to kill connections involved in a panic, so as a (hopefully temporary) workaround, a wrapper is used that checks for panics on drop and, if so, replaces the connection with a None before it is returned to the pool, at which point it is identified as dead via has_broken.
Moves from an async worker (bad abstraction) to a connection pool.
bb8
does not have an obvious way to kill connections involved in a panic, so as a (hopefully temporary) workaround, a wrapper is used that checks for panics on drop and, if so, replaces the connection with aNone
before it is returned to the pool, at which point it is identified as dead viahas_broken
.Draft asit compiles but is not yet tested.