Handles connection resetting.