Fixes #14891 Prevent connection creation race condition