Fix possible deadlock in async_get error handler