oxidecomputer / async-bb8-diesel

Safe asynchronous access to Diesel and the bb8 connection manager
MIT License
12 stars 8 forks source link

Use a 'connection killer' to help make transactions panic & cancel-safe #81

Open smklein opened 2 days ago

smklein commented 2 days ago

Adds (and uses) a ConnectionKiller, which marks a connection as dead if it is synchronously dropped, even from an asynchronous context. This ensures connections used by transactions are marked "unusable" if the transaction is cancelled and dropped.

Fixes https://github.com/oxidecomputer/async-bb8-diesel/issues/47