Reworked connection handling behavior