BUG-5280: fix race proxy creation and reconnect