on closing DB to analyze real fetch error. Borrowed from https://github.com/cyrusimap/cyrus-sasl/pull/554 Resolves: rhbz#1947971
Resolves: rhbz#1947971 Sync with Fedora commit (cherry picked from commit 6284b7d8b7aadba6a468df348ffca7c67b13aad5)
Resolves: rhbz#1947971