Handle failed connections properly when generating a list of frontends.

Fixes #11514