fix release of nil connection on connect error