[PRX-63] improve connection handling