Fix rare case where a connection has been created but is not connected