crash state recover

This commit fixes the problem where active goroutines have a hold on a
session, but the database connection drops and the session becomes
unavailable.

There is probably a better way to recover from this, however, this works
for now.