Exception safety for std::mutex::lock in Connection